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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: zcmd.. (
/showthread.php?tid=105486)
zcmd.. -
GTA_Rules - 29.10.2009
Hi,
Okay, so I'm trying to make sscanf work with zcmd, that fails horribly. If anybody could give me an example, I'd be thankful.
Matthias
Re: zcmd.. -
woot - 29.10.2009
pawn Код:
zcmd(commandname, playerid, params[])
{
new
commandPARAM [ 128 ], // Parameter is a string
commandSTRING[ 128 ]; // String to .. yeah.
if(sscanf (params, "s", commandPARAM)) // Check if the parameter has been given,
return SendClientMessage( playerid, 0xFFFFFFAA, "USE: /commandname [ param ]"); // if not, return this.
format( commandSTRING, 128, "Entered parameter for /commandname: %s", commandPARAM); // If parameter is given
SendClientMessage( playerid, 0xFFFFAA, commandSTRING); // then send the formatted message
return 1;
}
Re: zcmd.. -
GTA_Rules - 29.10.2009
Ugh my bad, I ment irccmd + sscanf
(using the new plugin)
Like this:
IRCCMD:command(botid, channel[], user[], host[], params[])
{
if (botid == gBot)
{
...
}
}
Re: zcmd.. -
woot - 29.10.2009
Try asking in the thread where you got the plugin from, or the creator / author of it.

But it should be really the same.
Re: zcmd.. -
GTA_Rules - 29.10.2009
Thanks a lot, ******. That worked