PLAYER_STATE_WASTED After First Spawn -
dudaefj - 11.09.2012
Hello
i'm trying to script a RP gamemode, but sometimes after make the first spawn my char dies by reason 255 and the calback OnPlayerStateChange is caled by new state = 7
Look the callbacks backtrace:
PHP код:
[11/09/12 19:56:31] OnPlayerConnect // When I connect
[11/09/12 19:56:31] connections => Bot_Bsli conectou no servidor. (id: 0 - IP: 127.0.0.1)
[11/09/12 19:56:35] OnPlayerRequestClass // Some seconds after connection
[11/09/12 19:56:45] OnDialogResponse //After put my password on dialog login
[11/09/12 19:56:47] OnPlayerStateChange(0, 8, 0) // A spawn in progress
[11/09/12 19:56:47] OnPlayerSpawn // the callback spawning me
[11/09/12 19:56:47] OnPlayerStateChange(0, 7, 8) // Here is where everything goes to a weird way
[11/09/12 19:56:47] OnPlayerDeath(0, 65535, 255) // Weird die by a weird reason
[11/09/12 19:56:47] [death] Bot_Bsli died 255
[11/09/12 19:56:53] OnPlayerStateChange(0, 8, 7)
[11/09/12 19:56:53] OnPlayerSpawn // now everything go alright and I got a nice spawn
does anyone know why is it happening?
Re: PLAYER_STATE_WASTED After First Spawn -
Kirollos - 12.09.2012
show us OnPlayerSpawn and OnPlayerStateChange ?
Re: PLAYER_STATE_WASTED After First Spawn -
dudaefj - 13.09.2012
OnPlayerSpawn was empty
I mean, I tried to comment it (put under /* code here */) to see if anything changed
Quote:
public OnPlayerSpawn(playerid)
{
AntiDeAMX();
WasteDeAMXersTime();
return 1;
}
|
and the OnPlayerStateChange here:
http://pastebin.com/L680XZmx
I really can't believe it's reponsible by the problem...
I tried to make some experiences...
putting the first spawn on OnPlayerConnect (before the login box)
I got the same error
but, how sooner on OnPlayerConnect function I've put the spawn function, lower the possibility to have the die bug on spawn
If I put the spawn on the end of OnPlayerConnect, on ~50% times I got killed
If I put the spawn on the middle of OnPlayerConnect, I've got around 15% times killed after spawn
if you want my OnPlayerConnect:
http://pastebin.com/3RbcgVun
Re: PLAYER_STATE_WASTED After First Spawn -
Slaykler - 13.09.2012
What is your Gravity Level set too? Due to That could be killing your character everytime you spawn. Have you altered your Gravity settings at all?
Re: PLAYER_STATE_WASTED After First Spawn -
dudaefj - 13.09.2012
gravity = 0.008
if it would be the gravity, it would happen any time, not just on first spawn =(