IsPlayerConnected Bug..
#1

Hei..


I have problem, I got one GM, and any command I use it says player isn't connected, even /goto.
But it worked before .. I haven't change anything..

Please help, I have no clue how to fix it. I have ~200 CMD and every command says that.
Reply
#2

What version of SA-MP are you trying to use with your gamemode? It's likely that your problem stems from the fact that sscanf 2.0 isn't working with 0.3d yet.
Reply
#3

Quote:
Originally Posted by Calgon
View Post
What version of SA-MP are you trying to use with your gamemode? It's likely that your problem stems from the fact that sscanf 2.0 isn't working with 0.3d yet.
Off (since he doesn't have his visitor messages enabled):
Welcome back calgon! Nerd (no offense)
Reply
#4

I use 0.3c, and I have sscanf2 also in use..
Any other solution ?
Reply
#5

Help! There must be any solution.. http://forum.sa-mp.com/showthread.ph...ghlight=sscanf
Reply
#6

make sure IsPlayerConnect dont have !
like this

Code:
if(!IsPlayerConnect(targetid))
thats wrong one!

better use this

Code:
if(targetid == INVALID_PLAYER_ID) return error msg!
trust me
Reply
#7

Code:
CMD:goto(playerid, params[])
{
	new other;

	if(sscanf(params,"u", other)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /goto [Id/Nme]");
    new Float:plocx,Float:plocy,Float:plocz;
    if(other != INVALID_PLAYER_ID)
	{
		if(UserInfo[playerid][AdminLevel] >= 1)
		{
			GetPlayerPos(other, plocx, plocy, plocz);
			if(UserInfo[other][pInt] > 0)
			{
				SetPlayerInterior(playerid,UserInfo[other][pInt]);
				UserInfo[playerid][pInt] = UserInfo[other][pInt];
			}
			if(UserInfo[playerid][pInt] == 0)
			{
				SetPlayerInterior(playerid,0);
			}
			if(GetPlayerState(playerid) == 2)
			{
				new tmpcar = GetPlayerVehicleID(playerid);
				SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
				TelePos[playerid]{0} = 0.0;TelePos[playerid]{1} = 0.0;
				SetPlayerInterior(playerid, GetPlayerInterior(other));
			}
			else
			{
				SetPlayerInterior(playerid, GetPlayerInterior(other));
				SetPlayerPos(playerid,plocx,plocy+2, plocz);
			}
			SendClientMessage(playerid, COLOR_GRAD1, "You are teleported.");
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "You don't have rights.");
		}
	}
	return true;
}
Reply
#8

well try to change

pawn Code:
if(other != INVALID_PLAYER_ID)
to this

pawn Code:
if(other == INVALID_PLAYER_ID)
Reply
#9

Watch my code with logic, if I change it, then it means other == invalid ID and how he teleports to there !?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)