Jump to content

Comanda de /setadmin


GabyOwN
 Share

Recommended Posts

  • SERVER SIDE
  •  
  •  
  • Username: GabyOwN
  • Nume resursa: Comanda /setadmin
  • Creator (sau editor): baietii de pe discord-ul https://discord.gg/tAgX3guhyJ si GabyOwN cu putin edit
  • Poze/Video de prezentare: tabel in database la users: unknown.png
  • Link download:
    This is the hidden content, please
  • Alte precizări: pentru ajutor dati reply!

ATENTIE: PENTRU A BAGA VERIFICARE LA COMENZI

trebuie sa aveti in server side: let newTarget = mp.players.at(target);

 

la playerJoin bagati asta:

player.admin = result[0].admin)

 

apoi asta bagati la comanda:

 

if(player.admin < 7)

return player.outputChatBox("!{grey} >> !{white}Nu ai gradul administrativ necesar!");

Quote

asa ar trebuii sa arate o comanda permisiune:

mp.events.addCommand("vspawn", (player, vehID) => {
    
        if(player.admin < 1) 
        return player.outputChatBox("!{grey}>> !{white}Nu ai gradul administrativ necesar!");

    if(!vehID) 
        return player.outputChatBox(`!{grey}Syntax >> !{white}/vspawn (vehid)`);
    
    var skema = {};

    for(var id in cars) {
        if(cars.hasOwnProperty(id) && cars[id].DisplayName === vehID.toUpperCase()) {
            skema[id] = cars[id];
        }
    }

    if(JSON.stringify(skema)!='{}') 
    {
    const vehicle = mp.vehicles.new(mp.joaat(vehID), player.position,
    {
        heading: player.heading,
        dimension: player.dimension,
        numberPlate: "AdmCar"
    }); 
        player.putIntoVehicle(veh, 0);    
    } 
    else 
    {
        return player.outputChatBox(`!{grey}>> !{white}Model-ul introdus nu corespunde!`);
    }
    player.outputChatBox(`!{grey}>> !{white}Ai spawnat un vehicul de tip !{grey}${vehID}.`);
});

Edited by GabyOwN
inloc de admin puteti sa faceti si premium sau vip sau ce vreti voi
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 1 month later...
  • 1 year later...
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...