Posts: 30
Threads: 16
Joined: Jun 2017
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
Posts: 291
Threads: 43
Joined: Sep 2016
Reputation:
0
use GetPlayerHealth to save the targeted players health into a variable.
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
You could try using teams to nullify the damage, it should work if done right.
Posts: 493
Threads: 82
Joined: Oct 2016
Reputation:
0
Create a new float, getting the players health. If the amount > playerhealth, setplayerhealth to 50.
Posts: 30
Threads: 16
Joined: Jun 2017
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
Posts: 30
Threads: 16
Joined: Jun 2017
deagle damage is bugged, i set to 13 and it's damage it's 50 cuz gta single i think
Posts: 30
Threads: 16
Joined: Jun 2017
Код:
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