Problem with INVALID_PLAYER_ID - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with INVALID_PLAYER_ID (
/showthread.php?tid=657112)
Problem with INVALID_PLAYER_ID -
,TomY' - 01.08.2018
Hey hey. I have problem with command. When I use this command for random nickname, that isn't in server, like: /idd asdadasd , server show ID: Why INVALID_PLAYER_ID isn't work? I have newest sscanf version.
Код:
if(!strcmp(cmdtext, "/idd", true,4))
{
new id;
if(sscanf(cmdtext[5], "u", id)) return SendClientMessage (playerid, 0xD9E916FF,"Use: /idd [Name]");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid,0x6FA7FB50, "* Invalid name");
new msg[125];
format(msg,sizeof(msg),"ID: %s",id);
SendClientMessage(playerid,0x45A9BAFF,msg);
return 1;
}
Re: Problem with INVALID_PLAYER_ID -
Rolux - 01.08.2018
Just use IsPlayerConnected.