SA-MP Forums Archive
Deathbug discussion? - 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: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Deathbug discussion? (/showthread.php?tid=356817)

Pages: 1 2


Deathbug discussion? - FireCat - 05.07.2012

Well I've had the curse following my servers all the time, yet I haven't find a proper way to technically fix it.
I thought, like...
The death bug, is that, you kill someone, you see him lying down, so does everyone, except the player that got killed, he still can run around, but his health is setted to 100 (I think, not sure, sometimes it does, and sometimes it doesnt)
I only found a solution (my self), getting (client side) the player's anim, and comparing it to a server side one, possibly?
Or, like when he dies, it still sends a death message (if enabled) so we could set a var to 1, to check if the player died, that means we could check if the variable is 1 and retrieve the player's velocity, probably?


Respuesta: Deathbug discussion? - [DOG]irinel1996 - 05.07.2012

Yes, that's right, I could say that it's confirmed.
I saw both parts of the bug, I mean I got killed (the death message was sent) and I could walk around, and I killed and the player which died got bugged. Good idea about the fix solution.


Respuesta: Deathbug discussion? - Chris1337 - 05.07.2012

Just Do This :

pawn Code:
SetPlayerHealth(playerid, 1.0);
    ClearAnimations(playerid);
on onplayerdeath

and for my server its fixed


Re: Deathbug discussion? - MP2 - 05.07.2012

Has anyone experienced the bug where you die and respawn INSTANTLY? I think this may be a bug with y_classes and ForceClassSelection (yay another bug ).

In fact, Y_Less, I know I told you about a few bugs with y_classes like that^ and the 'double-spawn' bug - I think they're all because ForceClassSelection is always 'on'. Is there a reason for this apart from to hide the F4 message? I think bugs like that take more priority over a message that'll really never be seen. Could be worth while looking in to that as it'd fix at least 3 bugs.


Re: Respuesta: Deathbug discussion? - CyNiC - 05.07.2012

Quote:
Originally Posted by axxelac
View Post
Just Do This :

pawn Code:
SetPlayerHealth(playerid, 1.0);
    ClearAnimations(playerid);
on onplayerdeath

and for my server its fixed
The solution for this problem isn't the question here(its easy to solve), we are wondering to know why this happens and how to detect problematic players.


Re: Respuesta: Deathbug discussion? - MP2 - 05.07.2012

Quote:
Originally Posted by CyNiC
View Post
The solution for this problem isn't the question here(its easy to solve), we are wondering to know why this happens and how to detect problematic players.
This is a discussion topic in a discussion forum, to discuss the bug and hopefully find a solution.


Re: Deathbug discussion? - [KHK]Khalid - 05.07.2012

Read the last reply in this topic. Not sure if it will work but I'm sure it will fail if GetPlayerPos returns the position that the BUGGED player is at (which he sees on his screen), it worth a try though.


Re: Deathbug discussion? - Amit_B - 05.07.2012

@FireCat: You've suggested some ways to detect if the bug occurs, but it doesn't help to fix it because it's just detecting.

I'm running a big DM server and that bug happens to my players a lot; I've found that when a player is in this bug, you need to damage him in some way. By damaging I don't mean to set his health with SetPlayerHealth because this won't help, also, spawning the player or setting his position will just not affect at this status.

Anyway, when a player in that bug status get shotted (by player who actually won't see him - the bugged one just gets in shooting between other players) the bug is solved. Also, if we exploding the position of the player, it's damaging him and fixes the bug. Also if the player jumps from a high position to the ground, so the falling will damage him, the bug is fixed too.

I had an idea of setting the player velocity to negative Z value when he's on the ground so he will be damaged and the bug will be fixed, but I think that SetPlayerVelocity will not affect him just as the most of other functions will not.


Re: Deathbug discussion? - FireCat - 05.07.2012

Quote:
Originally Posted by Amit_B
Посмотреть сообщение
@FireCat: You've suggested some ways to detect if the bug occurs, but it doesn't help to fix it because it's just detecting.

I'm running a big DM server and that bug happens to my players a lot; I've found that when a player is in this bug, you need to damage him in some way. By damaging I don't mean to set his health with SetPlayerHealth because this won't help, also, spawning the player or setting his position will just not affect at this status.

Anyway, when a player in that bug status get shotted (by player who actually won't see him - the bugged one just gets in shooting between other players) the bug is solved. Also, if we exploding the position of the player, it's damaging him and fixes the bug. Also if the player jumps from a high position to the ground, so the falling will damage him, the bug is fixed too.

I had an idea of setting the player velocity to negative Z value when he's on the ground so he will be damaged and the bug will be fixed, but I think that SetPlayerVelocity will not affect him just as the most of other functions will not.
Well when I see this happening with my players, I normaly just /slap them, then it works...


Re: Deathbug discussion? - Amit_B - 05.07.2012

Then your slap uses SetPlayerPos or SetPlayerVelocity?


Re: Deathbug discussion? - ReneG - 05.07.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    FixPlayer(playerid);
    return 1;
}

stock FixPlayer(playerid)
{
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SetPlayerPos(playerid, pos[0], pos[1], pos[2]+10.0);
    return 1;
}
What's wrong with that?


Re: Deathbug discussion? - FireCat - 05.07.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    FixPlayer(playerid);
    return 1;
}

stock FixPlayer(playerid)
{
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SetPlayerPos(playerid, pos[0], pos[1], pos[2]+10.0);
    return 1;
}
What's wrong with that?
So each time the player dies, he will be forced to change position?
What if he's under... lets say a small bridge?
Some noobs will report him for hacking...


Re: Deathbug discussion? - Y_Less - 05.07.2012

I believe that ramping gravity up massively kills people instantly. Obviously that doesn't help if you can't set it per-player, but would that fix the bug if it were possible?


Re: Deathbug discussion? - ReneG - 05.07.2012

Quote:
Originally Posted by FireCat
Посмотреть сообщение
So each time the player dies, he will be forced to change position?
What if he's under... lets say a small bridge?
Some noobs will report him for hacking...
That's the only flaw, thank goodness there is a range parameter in CreateExplosion.


Re: Deathbug discussion? - FireCat - 05.07.2012

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
I believe that ramping gravity up massively kills people instantly. Obviously that doesn't help if you can't set it per-player, but would that fix the bug if it were possible?
Well, with the death bug, you don't see the player moving, he's just lying down on the floor...
But him self, sees him running around and can shoot, and when you shoot the person on the floor their like "I'm not there!" because they don't move... So what I use to "fix" it, is just /slap him
So probably that would fix it...


Re: Deathbug discussion? - ReneG - 05.07.2012

Try creating a small explosion at the player small as in (0.001) so other players aren't wrongly injured.


Re: Deathbug discussion? - FireCat - 05.07.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Try creating a small explosion at the player small as in (0.001) so other players aren't wrongly injured.
Why not just set the player's health to 0 instead?
No that won't work, he has to be injured, but not server sided, thats why /slap works...
It's client sided... Object colision


Re: Deathbug discussion? - Y_Less - 05.07.2012

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Well, with the death bug, you don't see the player moving, he's just lying down on the floor...
But him self, sees him running around and can shoot, and when you shoot the person on the floor their like "I'm not there!" because they don't move... So what I use to "fix" it, is just /slap him
So probably that would fix it...
I'm talking about essentially re-killing the player. It doesn't really matter what other people see, you need them to die on their screen.


Re: Deathbug discussion? - FireCat - 05.07.2012

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
I'm talking about essentially re-killing the player. It doesn't really matter what other people see, you need them to die on their screen.
Hmm probably changing their gravity radicaly would fix it (like you said)


Re: Respuesta: Deathbug discussion? - CyNiC - 06.07.2012

Quote:
Originally Posted by Y_Less
View Post
Yes it is...
Ok, change the player health for 1.0 and he will die.