18.07.2012, 12:58
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.
Should Be Changed To:
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.
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;
}
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;
}