!IsPlayerConnected is not working
#1

Hi. When I type this command for an inactive player, I'm getting slap by myself. And When I do it for an active player, he is getting slap by me so its ok. But I don't know why !IsPlayerConnected isn't working, any idea about this ?

Code:
dcmd_slap(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
	new targetid;
	if(sscanf(params, "uz", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}[{FF0000}USAGE{FFFFFF}]{EFF7FF} /slap <playerid>");
	if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}[{FF0000}ERROR{FFFFFF}]{EFF7FF} Inactive player.");
	else
	{
	new Float:SLX, Float:SLY, Float:SLZ;
	GetPlayerPos(targetid, SLX, SLY, SLZ);
	SetPlayerPos(targetid, SLX, SLY, SLZ+10);
  	}
	return 1;
}
Reply


Messages In This Thread
!IsPlayerConnected is not working - by Matz - 18.02.2012, 15:28
Re: !IsPlayerConnected is not working - by WackoX - 18.02.2012, 15:32
Re: !IsPlayerConnected is not working - by emokidx - 18.02.2012, 15:33
Re: !IsPlayerConnected is not working - by Matz - 18.02.2012, 15:40
Re: !IsPlayerConnected is not working - by emokidx - 18.02.2012, 15:45
Re: !IsPlayerConnected is not working - by Konstantinos - 18.02.2012, 15:49
Re: !IsPlayerConnected is not working - by Matz - 18.02.2012, 19:57
Re: !IsPlayerConnected is not working - by IstuntmanI - 18.02.2012, 20:05
Re: !IsPlayerConnected is not working - by Matz - 18.02.2012, 21:02
Re: !IsPlayerConnected is not working - by IstuntmanI - 18.02.2012, 21:07

Forum Jump:


Users browsing this thread: 2 Guest(s)