SetPlayerHealth bug?
#1

I've noticed in the places I have SetPlayerHealth to 0, the player doesn't die immediately, and can walk around for several seconds afterwards. Is this a bug? Or lag? I was testing on local, though.
Reply
#2

Hmm. Try to set his hp -1 If he don't die, Then your script problem
Reply
#3

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
Hmm. Try to set his hp -1 If he don't die, Then your script problem
Same problem. I'll check my script.
Reply
#4

When you get a chance go ahead and paste the code here for the onplayerdeath, I think I might know the issue however would have to see whats going on for myself
Reply
#5

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
Is this a bug?
Yes it's a bug.

Write it like this:

PHP код:
//At top of your script
#if !defined FLOAT_INFINITY
    #define FLOAT_INFINITY (Float:0x7F800000)
#endif
//Then do this in the command:
SetPlayerHealth(playerid,-FLOAT_INFINITY); 
Greekz
Reply
#6

Quote:
Originally Posted by Bennyy
Посмотреть сообщение
When you get a chance go ahead and paste the code here for the onplayerdeath, I think I might know the issue however would have to see whats going on for myself
Well, beforehand, I had one line of code in onplayerdeath, no i have removed that code, and I haven't had any problems. The issue I think was that SetPlayerHealth was being called twice in certain instances, so the second time it was called, it gave the player time to move around.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)