Jump to content
  • 0

comenzi


shaun

Question

cum fac ca atunci cand un player da o comanda ... sa nu poata accesa alte comenzi...sa il faca inapt la comenzi...

doar anumite comenzi ca am un script cu football....si nu vreau sa acceseze decat o singura comanda

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

Guest RockStar

Foloseste

if(!IsPlayerAdmin( playerid )) return SendClientMessage( playerid , 0xFFFFFFFF ," Nu esti admin ! " ) ; 

Si faci comanda accesibila doar pentru RCON Admin ...

Link to comment
Share on other sites

incerca sa creezi o noua fuctie pfotbalp si sa pui la fiecare comanda din mod ceva de genu

if(PlayerInfo[para1][pFotbalP] == 1)
{
             SendClientMessage(playerid, COLOR_GREY, "   Nu Poti Folosi Comenda Deoarece Joci Fotbal");
             return 1;
}

sper sa te ajute

Link to comment
Share on other sites

Guest PlayON

strcmp

Atunci, ia codu acesta, si punel sus de tot.


#define AllowCommand(%0)      if ( strcmp( cmdtext, %0, true) == 0 ) return 1;


Acuma in OnPlayerCommandText sa adaugam restrictia + functia care da voie la anumtele comenzi.


public OnPlayerCommandText( playerid, cmdtext[ ] )

{

    if ( Restrictie[ playerid ] )

    {

        //FARA ; la sfarsitul functii! (ca asa am vrut eu)

        AllowCommand("/cmd1")

        AllowCommand("/tre")

        AllowCommand("/xdi")

        AllowCommand("/1235f")

        SendClientMessage( playerid, 0xFF2020FF, "ERROR:{FFFFFF} Ai voie sa folosesti doar: /cmd1 /tre /xdi /1235f" );

        return 0;

    }

    //SUS IN ACEL PUBLIC, MAI JOS VIN TOATE COMENZILE

    return 0;

}


Foloseste ce variabila ai tu inloc de Restrictie[ playerid ]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.