Problem with INVALID_PLAYER_ID
#1

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;
		}
Reply
#2

Just use IsPlayerConnected.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)