Damage System
#1

My damage system it's ok but at deagle, shotgun and sawn off damage it's changed but i don't know, i have a injured system under 50hp but deagle is 13 damage and player goes to 47 HP. If I shoot one more time with deagle when player is 47HP he die instantly and not go to injury system
Reply
#2

use GetPlayerHealth to save the targeted players health into a variable.
Reply
#3

You could try using teams to nullify the damage, it should work if done right.
Reply
#4

Create a new float, getting the players health. If the amount > playerhealth, setplayerhealth to 50.
Reply
#5

https://sampforum.blast.hk/showthread.php?pid=3872869#pid3872869
https://sampforum.blast.hk/showthread.php?tid=563387
Reply
#6

It doesn't work, if i put the match on OnPlayerUpdate() if i connect on server it's says that i am dead but i am not because health is 0 and probably doesn't recognize why
Reply
#7

deagle damage is bugged, i set to 13 and it's damage it's 50 cuz gta single i think
Reply
#8

Quote:
Originally Posted by valelele
Посмотреть сообщение
deagle damage is bugged, i set to 13 and it's damage it's 50 cuz gta single i think
Can you please show us the code you written?
Reply
#9

Код:
public OnPlayerUpdate(playerid)
{
                new Float:health, Float:x, Float:y, Float:z;
		GetPlayerHealth(playerid, health), GetPlayerPos(playerid, x, y, z);
		if(IsPlayerInAnyVehicle(playerid))
		{
			if(health <= 35 && GetPVarInt(playerid, "Dead") == 0)
			{
				RemovePlayerFromVehicle(playerid);
				SetPlayerPosEx(playerid,x,y,z+2);
				SetPlayerHealth(playerid, 35);
				CallRemoteFunction("Wounded","i", playerid);
			}
		}
		else
		{
			if(health <= 35 && GetPVarInt(playerid, "Dead") == 0)
			{
				SetPlayerHealth(playerid, 35);
				CallRemoteFunction("Wounded","i", playerid);
			}
		}
}
And if i am login on the server this is the problem it's callremotefunction the wounded header

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)