[REP+] Gamemode compile error
#9

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
Wait... where have you placed this command? Under OnPlayerCommandText or any other public function?

EDIT: With ZCMD, you do not have to place commands under OnPlayerCommandText. If you are converting from strcmp to ZCMD, follow the instructions below.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/mystrcmp", true) == 0)
    {
    //Do Something Here
    }
 
    if(strcmp(cmdtext, "/myzcmd", true) == 0)
    {
    //Do Something here
    }
    return 1;
}
Should Be Changed To:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/mystrcmp", true) == 0)
    {
    //Do Something here
    }
    return 1;
}

CMD:myzcmd(playerid, params[])
{
    //Do Something Here
    return 1;
}
As you can see, the strcmp remains under OnPlayerCommandText, while the ZCMD can move anywhere it wants, baring in mind that all includes functions are already defined before being used.
zcmd+strcmp will not work,will be Unknown Command
like i say this
http://forum.sa-mp.com/showpost.php?...67&postcount=4
Reply


Messages In This Thread
Gamemode compile error (CMD) - by Uberanwar - 18.07.2012, 12:15
Re: [REP+] Gamemode compile error - by Uberanwar - 18.07.2012, 12:48
Re: [REP+] Gamemode compile error - by clarencecuzz - 18.07.2012, 12:50
Re: [REP+] Gamemode compile error - by Skaizo - 18.07.2012, 12:54
Re: [REP+] Gamemode compile error - by Uberanwar - 18.07.2012, 12:54
Re: [REP+] Gamemode compile error - by clarencecuzz - 18.07.2012, 12:58
Re: [REP+] Gamemode compile error - by Rudy_ - 18.07.2012, 13:00
Re: [REP+] Gamemode compile error - by tiernantheman - 18.07.2012, 13:00
Re: [REP+] Gamemode compile error - by Skaizo - 18.07.2012, 13:20
Re: [REP+] Gamemode compile error - by clarencecuzz - 18.07.2012, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)