Injury System like LS:RP
#1

How can i make if hitid( player shooted) is in car and i want to him get in injured system.
If he is on foot it's working but if it's on car it don't
Here is script


Код:
if(hittype == BULLET_HIT_TYPE_PLAYER)
	{
		if(health < 50 && GetPVarInt(hitid, "Dead") == 0)
		{
			SetPlayerHealth(hitid, 50);
			SetTimerEx("Wounded", 0, 0, "ii", playerid, hitid);
		}
	}
    if(GetPVarInt(hitid, "Dead") == 6)
	{
		DestroyDynamic3DTextLabel(PlayerInfo[hitid][pInjuriesText]);
		GetPlayerPos(hitid, x, y, z);
		PlayerInfo[hitid][pInjuriesText] = CreateDynamic3DTextLabel("(( THIS PLAYER IS NOW DEAD ))", COLOR_ERROR, x, y, z, 25.0, hitid, INVALID_VEHICLE_ID, 1, GetPlayerVirtualWorld(hitid), GetPlayerInterior(hitid), -1, 20.0);
		SendClientMessage(hitid, 0xFFFF00AA, "-> You're now dead. You need to wait 60 seconds and then you'll get the ability to /respawnme.");
		SetPVarInt(hitid, "Dead", 7);
		return 0;
	}

forward Wounded(playerid, hitid);
public Wounded(playerid, hitid)
{
	new Float:x, Float:y, Float:z, stringdamage[128], damagetext[128];
	GetPlayerPos(hitid,x,y,z);
	SetPVarInt(hitid, "Dead", 6);
	ApplyAnimationEx(hitid, "WUZI", "CS_Dead_Guy", 4.0, 0, 1, 1, 1, 0);
	ResetPlayerWeaponsEx(hitid);
	GameTextForPlayer(hitid, "~b~BRUTTALY WOUNDED", 5000, 3);
	GetPlayerPos(hitid, x, y, z);
	
	format(stringdamage, sizeof(stringdamage), "(( Has been injured %d times, \n/damages %d for more information.\n ))", CountDamages(hitid), hitid);
	PlayerInfo[hitid][pInjuriesText] = CreateDynamic3DTextLabel(stringdamage, COLOR_ERROR, x, y, z, 25.0, hitid, INVALID_VEHICLE_ID, 1, GetPlayerVirtualWorld(hitid), GetPlayerInterior(hitid), -1, 20.0);
	
	SendClientMessage(hitid, COLOR_ERROR, "You were brutally wounded, now if a medic or anyone else doesn't save you, you will die.");
	SendClientMessage(hitid, COLOR_ERROR, "To accept death type /acceptdeath.");
	format(damagetext, sizeof(damagetext), "(( Has been injured %d times, /damages %d for more information. ))", CountDamages(hitid), hitid);
	SendClientMessage(hitid, COLOR_ERROR, damagetext);
	return 1;
}
Reply


Messages In This Thread
Injury System like LS:RP - by valelele - 22.06.2017, 00:20
Re: Injury System like LS:RP - by JasonRiggs - 22.06.2017, 00:48
Re: Injury System like LS:RP - by valelele - 22.06.2017, 01:09
Re: Injury System like LS:RP - by Rocket16 - 22.06.2017, 01:24
Re: Injury System like LS:RP - by Kane - 22.06.2017, 01:26

Forum Jump:


Users browsing this thread: 2 Guest(s)