Quote:
Originally Posted by Stinged
I think this sscanf plugin will work for you. 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; }
Also, Read this, it tells you how sscanf works. Click me
|
I just did all commands like this but it still returns "Player isn't connected", plugin 2.8.1, include too.