[0.3] PLAYER_STATE_SPAWNED bug? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [0.3] PLAYER_STATE_SPAWNED bug? (
/showthread.php?tid=112857)
[0.3] PLAYER_STATE_SPAWNED bug? -
SiJ - 10.12.2009
Hey,
I tried using this:
pawn Code:
public MyTimer(playerid)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_SPAWNED)
{
//my code here
}
}
}
And it didn't worked, when I spawned..
I tried debuging the code:
pawn Code:
public MyTimer(playerid)
{
print("Timer Called");
if(IsPlayerConnected(playerid))
{
print("Players checked");
if(GetPlayerState(playerid) == PLAYER_STATE_SPAWNED)
{
print("Player state checked");
//my code here
}
}
}
It printed "Timer Called" and "Players checked" into console, but it never printed "Player state checked"... :\
BTW, to make my timer work correctly, I used
if(GetPlayerState(playerid) != PLAYER_STATE_NONE)
is this is good to use?
Re: [0.3] PLAYER_STATE_SPAWNED bug -
beckzy - 10.12.2009
Your state is only PLAYER_STATE_SPAWNED the exact moment you spawn.
Re: [0.3] PLAYER_STATE_SPAWNED bug -
SiJ - 10.12.2009
Quote:
Originally Posted by BeckzyBoi
Your state is only PLAYER_STATE_SPAWNED the exact moment you spawn.
|
But on samp 0.2 GetPlayerState(playerid) == PLAYER_STATE_SPAWNED worked all the time from the moment player spawned..
Is this is some kind of "bug fix" in 0.3 ?
Re: [0.3] PLAYER_STATE_SPAWNED bug -
SiJ - 11.12.2009
Quote:
Originally Posted by SiJ
Quote:
Originally Posted by BeckzyBoi
Your state is only PLAYER_STATE_SPAWNED the exact moment you spawn.
|
But on samp 0.2 GetPlayerState(playerid) == PLAYER_STATE_SPAWNED worked all the time from the moment player spawned..
Is this is some kind of "bug fix" in 0.3 ?
|
Am I wrong?
Re: [0.3] PLAYER_STATE_SPAWNED bug? -
BMUK - 11.12.2009
That "state" never worked for me across any version so BeckzyBoi is probably right