[0.3] PLAYER_STATE_SPAWNED bug?
#1

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?
Reply
#2

Your state is only PLAYER_STATE_SPAWNED the exact moment you spawn.
Reply
#3

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 ?
Reply
#4

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?
Reply
#5

That "state" never worked for me across any version so BeckzyBoi is probably right
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)