zcmd..
#1

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
Reply
#2

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;
}
Reply
#3

Ugh my bad, I ment irccmd + sscanf

(using the new plugin)

Like this:

IRCCMD:command(botid, channel[], user[], host[], params[])
{
if (botid == gBot)
{
...
}
}
Reply
#4

Try asking in the thread where you got the plugin from, or the creator / author of it.
But it should be really the same.
Reply
#5

Thanks a lot, ******. That worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)