07.05.2012, 15:49
You need to use strdel on the parameters.
Although I'm half asleep, this SHOULD work if I remember correctly.
pawn Код:
CMD:test( playerid, params[] )
{
new
user,
action [ 24 ];
if( sscanf( params, "s[24]", action ) )
return SendClientMessage( playerid, -1, "Usage: /test [action]" );
if( strcmp( action, "slap", true) == 0 )
{
strdel( params, 0, 4 );
if( sscanf( params, "u", user ) )
return SendClientMessage( playerid, -1, "Usage: /test slap [playerid]" );
// They typed the params correct, /test slap 0 (for player ID zero)
}
return true;
}