Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Cum poti seta o comanda blocata / deblocata (/startwar, /attack)


Recommended Posts

Posted (edited)

Salut, astazi vreau sa va prezint un tutorial, cam cum puteti creea o comanda de tip /stopwar
sa dati disable la war-uri, etc.

Adaugam in gamemode pe la inceput:

new stopwar;

Mergem la OnGameModeIni si adaugam:

stopwar = 0;

Apoi mergem la comenzi si facem dupa urmatorul exemplu, 

CMD:stopwar(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 5) {
if(stopwar == 0)
{
stopwar = 1; // disable war
//Aici adaugati mesaj daca vreti
SCM(playerid, -1, "Ai dezactivat war-urile.");
}
else {
stopwar = 0; // active war
//Aici adaugati mesaj daca vreti
SCM(playerid, -1, "Ai activat war-urile.");
}
}
else return SCM(playerid, -1, "Trebuie sa fii admin pentru a putea folosi comanda asta!");
return 1;
}

La comanda voastra de /attack adaugati urmatoarea verificare: 

if(stopwar == 1) return SCM(playerid, -1, "War is disable.");

E ceva basic, ceea ce oricine cu cunostinte minime in pawn poate face, succes.

Edited by Yashin Adevaratu

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.