onplayercommandtext problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: onplayercommandtext problem (
/showthread.php?tid=515014)
onplayercommandtext problem -
Slicebook - 24.05.2014
I use zcmd, but does not detect the public OnPlayerCommandText(playerid,cmdtext[]) , what's wrong?
pl.
this says unknown command.
Код:
if (strcmp("/animlist", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_BLUE, "/anim-crossarms |");
return 1;
}
so you can use.
Код:
CMD:animlist(playerid, params[])
{
SendClientMessage(playerid, COLOR_BLUE, "/anim-crossarms |");
return 1;
}
why is it wrong? Anyone?
Re: onplayercommandtext problem -
SilentSoul - 24.05.2014
You used the zmcd command inside onplayercommandtext?
Re: onplayercommandtext problem -
Stanford - 24.05.2014
When you want to use ZCMD you shouldn't put the command under OnPlayerCommandText ---> which means you can put it anywhere in your gamemode, no matter what... and change OnPlayerCommandText to OnPlayerCommandRecieved and put in there the STRCMP commands.
I hope that I helped you, good luck.
Re: onplayercommandtext problem -
Slicebook - 24.05.2014
I'll try thanks for the answers