11.11.2013, 17:27
I think this sscanf plugin will work for you. Click me
use sscanf like this:
Also, Read this, it tells you how sscanf works. Click me
use sscanf like this:
pawn Код:
YCMD:spec(playerid, params[], help)
{
#pragma unused help
// Keep pragma unused help if you don't want to use the help thing y_commands have (or delete it if you do)
new id; // The ID you will enter after /spec
if(sscanf(params,"u",id)) SendClientMessage(playerid, -1, "Usage: /spec [id/name]");
else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000FF, "Player is not connected.");
else
{
// Do what you want here.
}
return 1;
}