SA-MP Forums Archive
Question about ZCMD - 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: Question about ZCMD (/showthread.php?tid=473987)



Question about ZCMD - Riwerry - 05.11.2013

Hello guys, can somebody explain me, why one man, used in his tutorial (AttachObjectToVehicle) zcmd command
pawn Код:
COMMAND:vehicle(playerid, cmdtext[])
I'm interested in "cmdtext[]" function, why did he used it? What will happen, if for example I replace this cmdtext with params? Thanks.


Re: Question about ZCMD - CoaPsyFactor - 05.11.2013

It doesn't matter how do you name second parameter of zcmd function, as long as its defined as string. Only difference is that you will use cmdtext instead of params in that command.


Re: Question about ZCMD - Riwerry - 05.11.2013

Okay mate, thanks for your reply, now I'm going to set it to params. Can I ask you have I can redirect this ZCMD command to public OnPlayerKeyStateChange?

pawn Код:
COMMAND:majak(playerid, params[])
Thanks for your reply.


Re: Question about ZCMD - Riddick94 - 05.11.2013

Quote:
Originally Posted by Riwerry
Посмотреть сообщение
Can I ask you have I can redirect this ZCMD command to public OnPlayerKeyStateChange?
I don't understand that. Do you mean, when user press something a command will be called? If so, use this:

pawn Код:
cmd_YoursCommandName(playerid, "");