Few questions about life (JK I mean OnplayerDeath)
#1

Just to ask few questions:
1. When player dies, on most od servers, he falls of floor like animation for falling, and that should be default thing. But on my server when player dies he can walk for like 2 seconds with 0 hp and then OnPlayerSpawn is called. How can I fix that, a should there be too the "blood pool" or dead pool on the place where he dies, because there isn't anything. Is fixes.inc fixing that, I think it is but not sure-- but why that needs to be fixed if it's in samp default
2. Why, sometimes, very rarely, but still happens, when player dies he spawns in grove street with cigarette and bottle in his hands, and he gets CJ running style?
Reply
#2

Do you set any animation in OnPlayerDeath? From my experience that can lead to the issues you described.
Most servers that have a custom dying animation don't actually let the player die, they basically just freeze them and apply an anim, then use a timer for respawning (health is completely server sided in that case).
Not sure about fixes.inc, but you could try weapon-config which also does that.
Reply
#3

Quote:
Originally Posted by NaS
Посмотреть сообщение
Most servers that have a custom dying animation don't actually let the player die, they basically just freeze them and apply an anim, then use a timer for respawning (health is completely server sided in that case).
Yeah, and a lot of servers don't even use OnPlayerDeath for their death system. They are maybe just applying an animation OnPlayerTakeDamage when their health is like 4, which I did on my server.
Reply
#4

Quote:

but you could try weapon-config which also does that.

I agree with NaS, and also you can use
OnPlayerStateChange can also be manipulated using
PHP код:
if(newstate == PLAYER_STATE_WASTED){
// Your code here 
It just needs some tweaking, I used this before along with OnPlayerDeath and OnPlayerSpawn... I just can't remember how I made it work.. Since now I'm already learning how to use weapon-config OnDeath something
Reply
#5

In addition to what others said, I want to mention that some previous systems consisted in letting the player die normally, then respawn in their death position with a frozen injurrd animation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)