Onplayetgetshoot
#1

Hello, I am making a system by which if ill hit a bullet of M4 to someone then he/ she will loose 50% of his HP/ armo.
How can I do it with this function?

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    new string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
    new weaponname[24];
    GetPlayerName(playerid, attacker, sizeof (attacker));
    GetPlayerName(damagedid, victim, sizeof (victim));
 
    GetWeaponName(weaponid, weaponname, sizeof (weaponname));
    format(string, sizeof(string), "%s has made %.0f damage to %s, weapon: %s", attacker, amount, victim, weaponname);
    SendClientMessageToAll(0xFFFFFFFF, string);
    return 1;
}
Thank you
Reply


Messages In This Thread
Onplayetgetshoot - by jamesmercer1947 - 30.04.2013, 11:50
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 11:52
Re: Onplayetgetshoot - by RVRP - 30.04.2013, 11:57
Re: Onplayetgetshoot - by jamesmercer1947 - 30.04.2013, 11:58
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 12:04
Re: Onplayetgetshoot - by RajatPawar - 30.04.2013, 12:10
Re: Onplayetgetshoot - by RVRP - 30.04.2013, 12:19
Re: Onplayetgetshoot - by KingHual - 30.04.2013, 12:20
Re: Onplayetgetshoot - by Pottus - 30.04.2013, 12:48
Re: Onplayetgetshoot - by KingHual - 30.04.2013, 13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)