IsPlayerConnected Bug.. -
NewbBeginner - 04.11.2011
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.
Re: IsPlayerConnected Bug.. -
Calgon - 04.11.2011
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.
Re: IsPlayerConnected Bug.. -
FireCat - 04.11.2011
Quote:
Originally Posted by Calgon
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)
Re: IsPlayerConnected Bug.. -
NewbBeginner - 04.11.2011
I use 0.3c, and I have sscanf2 also in use..
Any other solution ?
Re: IsPlayerConnected Bug.. -
NewbBeginner - 05.11.2011
Help! There must be any solution..
http://forum.sa-mp.com/showthread.ph...ghlight=sscanf
Re: IsPlayerConnected Bug.. -
GAMER_PS2 - 05.11.2011
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
Re: IsPlayerConnected Bug.. -
NewbBeginner - 05.11.2011
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;
}
Re: IsPlayerConnected Bug.. -
GAMER_PS2 - 05.11.2011
well try to change
pawn Code:
if(other != INVALID_PLAYER_ID)
to this
pawn Code:
if(other == INVALID_PLAYER_ID)
Re: IsPlayerConnected Bug.. -
NewbBeginner - 05.11.2011
Watch my code with logic, if I change it, then it means other == invalid ID and how he teleports to there !?