sscanf help
#1

i would like to make a cmd like this:

USAGE: /cmd <ID(Optional)> <Action>

I tested it with:
Код HTML:
if(sscanf(params, "U(-1)s[21]", player1, action)) return .....
if(player1 == -1) player1 = playerid
However, when i try with this, it only returns the usage message. Any ideas ?
Reply
#2

Код:
if(sscanf(params, "us[21]", player1, action))
{
//With ID
}
else if(sscanf(params, "s[21]", action))
{
//Without ID
}
else SendClientMessage(playerid,-1,"[Usage:] /cmd <ID(Optional)> <Action>");
Didn't tried it but let me know if that will work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)