GetPlayerState 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: GetPlayerState bug (
/showthread.php?tid=146458)
GetPlayerState bug -
erorcun - 07.05.2010
https://sampwiki.blast.hk/wiki/State
Quote:
7 Player is wasted or on class selection - "PLAYER_STATE_WASTED"
|
This does not work. When i wrote
pawn Код:
if(GetPlayerState(playerid) == 7)
{
//something
}
And, if player on the class selection, nothing happens.
Re: GetPlayerState bug - WackoX - 07.05.2010
Quote:
|
Originally Posted by erorcun
https://sampwiki.blast.hk/wiki/State
Quote:
7 Player is wasted or on class selection - "PLAYER_STATE_WASTED"
|
This does not work. When i wrote
pawn Код:
if(GetPlayerState(playerid) == 7) { //something }
And, if player on the class selection, nothing happens.
|
Where did you place that code?
Re: GetPlayerState bug -
erorcun - 07.05.2010
I didn't put it wrong.
Re: GetPlayerState bug -
dice7 - 07.05.2010
Just tested it and it really doesn't work
Re: GetPlayerState bug -
Jay_ - 07.05.2010
How about showing the full code you guys used to test it?
Re: GetPlayerState bug -
dice7 - 07.05.2010
pawn Код:
public OnPlayerUpdate(playerid)
{
if (GetPlayerState(playerid) == PLAYER_STATE_WASTED) printf("PLAYER_STATE_WASTED OnPlayerUpdate");
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if (GetPlayerState(playerid) == PLAYER_STATE_WASTED) printf("PLAYER_STATE_WASTED OnPlayerRequestClass");
return 1;
}
and not a single print
Re: GetPlayerState bug -
Obie27 - 08.05.2010
Could it be that that state is similar to the enter/exit vehicle states (They are only used internally, and never get returned in things like GetPlayerState)?
Re: GetPlayerState bug -
Riaz - 08.05.2010
When you die or select class, callback OnPlayerUpdate doesn't calling.
Re: GetPlayerState bug -
Luk_Ass - 08.05.2010
"PLAYER_STATE_WASTED" is only after F4 /kill. First class selection after connect is "PLAYER_STATE_NONE".
Re: GetPlayerState bug -
dice7 - 08.05.2010
Well, It didn't get called when I was randomly going through skins on skin selection, it didn't get called when I spawned (OnPlayerRequestSpawn) and it didn't get called when I killed myself via SetPlayerHealth(playerid, 0.0)