help with zcmd[need help] - 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: help with zcmd[need help] (
/showthread.php?tid=413873)
help with zcmd[need help] -
ZayanImran - 07.02.2013
i have another prob
how can i make /buyitem [item name] with zcmd
i mean what is the code to know that the player typed the item name
here is a e.g
pawn Код:
COMMAND:buyitem(playerid,params[])
{
if(!sscanf(params, "Test")
{
SendClientMessage(playerid, COLOR_RED, "test success :D!");
}
else SendClientMessage(playerid, COLOR_GREEN, "USAGE: /buyitem <item name> | use /shophelp for help.");
return 1;
}
help pls
Re: help with zcmd[need help] -
Youice - 07.02.2013
PHP код:
CMD:buyitem(playerid, params[])
{
new item[128];
if(sscanf(params, "s[128]", item)) {
SendClientMessage(playerid, COLOR_GREEN, "USAGE: /buyitem <item name> | use /shophelp for help.");
return 1;
}
SendClientMessage(playerid, COLOR_RED, "test success :D!");
return 1;
}
I recommend you to read
this