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