Help With IsNumeric
#4

Add this under your if(sscanf(...))
pawn Код:
else if(nPlayer == INVALID_PLAYER_ID) return SendClientMessage(/*your code*/);
if you really want to show which ID the player has entered use this:

pawn Код:
else if(nPlayer == INVALID_PLAYER_ID)
{
    format(string, sizeof(string), "%d is not a valid ID", nPlayer);
    SendClientMessage(playerid, /*COLOR here*/, string);
}
EDIT:

To optimize your code use sscanf like this:
pawn Код:
if(sscanf(params, "u", nPlayer)) return SendClientMessage(playerid, /*COLOR HERE*/, "[USAGE] /COMMAND [playerid/PartOfName]");
You don't have to, it's a tip
Reply


Messages In This Thread
Help With IsNumeric - by AroseKhanNiazi - 21.05.2014, 08:30
Re: Help With IsNumeric - by BroZeus - 21.05.2014, 08:34
Re: Help With IsNumeric - by AroseKhanNiazi - 21.05.2014, 08:41
Re: Help With IsNumeric - by AndySedeyn - 21.05.2014, 08:48

Forum Jump:


Users browsing this thread: 2 Guest(s)