10.12.2009, 19:45
Hey,
I tried using this:
And it didn't worked, when I spawned..
I tried debuging the code:
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?
I tried using this:
pawn Code:
public MyTimer(playerid)
{
if(IsPlayerConnected(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_SPAWNED)
{
//my code here
}
}
}
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
}
}
}
BTW, to make my timer work correctly, I used
if(GetPlayerState(playerid) != PLAYER_STATE_NONE)
is this is good to use?