ZCMD Little problem cmdtext - 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: ZCMD Little problem cmdtext (
/showthread.php?tid=609281)
ZCMD Little problem cmdtext -
blanic - 10.06.2016
-deleted-
Re: ZCMD Little problem cmdtext -
GTLS - 10.06.2016
in ZCMD there is params[] option. use params insted of cmdtext.also use sscanf2 for better performance.
PHP код:
new giveplayerid[128];
if(sscanf(params, "s", giveplayerid))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playername]");
return 1;
}
just add
at top. search on ****** for sscanf2 include for SAMP.
Re: ZCMD Little problem cmdtext -
Dayrion - 10.06.2016
Quote:
Originally Posted by GTLS
in ZCMD there is params[] option. use params insted of cmdtext.also use sscanf2 for better performance.
PHP код:
new giveplayerid[128];
if(sscanf(params, "s", giveplayerid))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playername]");
return 1;
}
just add at top. search on ****** for sscanf2 include for SAMP.
|
Optimize it and it will give you SSCANF warning.
PHP код:
new giveplayerid[MAX_PLAYER_NAME];
if(sscanf(params, "s[24]", giveplayerid)) return SendClientMessage(playerid, -1, "USAGE: /id [playername]");
By the way, you need to add this at the top of the script.
PHP код:
#include <sscanf2>
Re: ZCMD Little problem cmdtext -
Stinged - 10.06.2016
Just use params, it's already a string.
No need for sscanf when you only want to use a string.