Death System like LS:RP
#1

hello boyz, i want to make a copy of death system from LS:RP like this:

One player have a weapon(like AK-47) and he shoots after somebody, that player who is attacked if he has health under 35( health < 35) he goes to Injury System like he fell at the ground with ApplyAnimationEx(playerid, "WUZI", "CS_Dead_Guy", 4.0, 0, 1, 1, 1, 0);
And one 3dtext label is created above his head like this :
Code:
format(stringdamage, sizeof(stringdamage), "(( Has been injured %d times, /damages %d for more information. ))", CountDamages(playerid), playerid);
strcat(stringdamage, stringdamage2);
PlayerInfo[playerid][pInjuriesText] = CreateDynamic3DTextLabel(stringdamage, COLOR_ERROR, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 20.0);
Now it's okay, but if i want to shoot again in him, i don't want to take damage from the player is on the ground, like if i shoot with AK-47 10-20 bullets, he doesn't take damage and he goes to Death System and a 3DTextLabel is now "(( THE PLAYER IS DEAD )) ".


How could I make the player is on the ground to not taking damage in the injury system?
Thank you a lot boys, i make on OnThePlayerTakeDamage this:

Code:
if(GetPVarInt(playerid, "Dead") == 6)
{
     SetPlayerHealth(playerid, health+25);
     DestroyDynamic3DTextLabel(PlayerInfo[playerid][pInjuriesText]);
     GetPlayerPos(playerid, x, y, z);
     PlayerInfo[playerid][pInjuriesText] = CreateDynamic3DTextLabel("(( THIS PLAYER IS DEAD ))", COLOR_ERROR, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 20.0);
}
BUT THE PLAYER IS TAKING DAMAGE, WHY?
Reply
#2

I think you should use: https://sampforum.blast.hk/showthread.php?tid=563387
And simply return 0 at OnPlayerDamage
Reply
#3

it doesn't work, i want just on my gamemode, not to include. I have more if-s in OnPlayerTakeDamage
Reply
#4

I did something exactly like this without using weapon-config as well, without desyncing bullets or using laggy functions (best part is damage is still added to damage list even in death mode accurately). Excuse the poor video quality:

https://www.youtube.com/watch?v=3PXt-YRMVvg

What's the key to doing this? I'm not going to completely give it away but you can use teams (https://sampwiki.blast.hk/wiki/SetPlayerTeam) to your advantage, you just have to find a good way to use them.
Reply
#5

Yea but where i can put this? And then how can i escape from this SetPlayerTeam?
Reply
#6

https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot
return 0 there if you want to stop player giving damage. Returning 0/1 in OnPlayer Give/Take Damage does not have any effect other then breaking/continuing callback chain.

But keep in mind OnPlayerWeaponShot only works for weapons with bullets.


If you are hiding player tags then i guess you can set players health to 1000 and make some kind of custom damage system.
Reply
#7

Maybe set his hp for a very high count, Btw, It's not good to come in here and just say "I want to make this" and take ideas from other server.. This ain't cool, Start a system, then come if there are a bug or an error..
Reply
#8

I want just to not taking damage if someone is in Injury System(under 30 hp)
Reply
#9

Okay, Set the anim, and set his controllable to 0, and set his HP after that to 9999 or smth, ez
Reply
#10

I don't understand why does everyone want to make a replica of it. Be original. This will help you: https://sampforum.blast.hk/showthread.php?tid=558839
Reply
#11

On OnPlayerWeaponShot
Code:
{
     if(GetPVarInt(playerid, "Dead") == 6)
     {
	SetPlayerTeam(playerid, hitid);
     }
}
It\'s that ok?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)