OnPlayerTakeDamage, помогите
#1

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    if(
issuerid != INVALID_PLAYER_ID)
    {
        new 
string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
        
GetPlayerName(playeridvictimsizeof (victim));
        
GetPlayerName(issueridattackersizeof (attacker));
        if(
weaponid == 22SetPlayerHealth(playerid40);
        if(
weaponid == 23SetPlayerHealth(playerid40);
        if(
weaponid == 24SetPlayerHealth(playerid58);
        if(
weaponid == 25SetPlayerHealth(playerid80);
        if(
weaponid == 26SetPlayerHealth(playerid80);
        if(
weaponid == 27SetPlayerHealth(playerid80);
        if(
weaponid == 28SetPlayerHealth(playerid61);
        if(
weaponid == 29SetPlayerHealth(playerid64);
        if(
weaponid == 30SetPlayerHealth(playerid70);
        if(
weaponid == 31SetPlayerHealth(playerid73);
        if(
weaponid == 32SetPlayerHealth(playerid64);
        if(
weaponid == 33SetPlayerHealth(playerid68);
        if(
weaponid == 34SetPlayerHealth(playerid88);
        
format(stringsizeof(string),"%s выстрелил в %s."attacker,victim );
        
ProxDetector(20.0playeridstringCOLOR_PURPLE);
    }
    return 
1;

Не могу разобраться со следующем:
1. Не могу сделать чтобы писало "выстрелил в", только для тех оружий которые я указал
2. Как сделать чтобы снимало не 40хп например, а отнимало каждый раз при выстрели по 40хп
Помогите разобраться
Reply


Messages In This Thread
OnPlayerTakeDamage, помогите - by Stepan23 - 25.11.2011, 10:37
Re: OnPlayerTakeDamage, помогите - by Alexander_Petrov - 25.11.2011, 10:51
Re: OnPlayerTakeDamage, помогите - by Stepan23 - 25.11.2011, 11:00
Re: OnPlayerTakeDamage, помогите - by White_116 - 25.11.2011, 11:14
Re: OnPlayerTakeDamage, помогите - by Crystal_Speed - 25.11.2011, 11:15
Re: OnPlayerTakeDamage, помогите - by Stepan23 - 25.11.2011, 11:17
Re: OnPlayerTakeDamage, помогите - by White_116 - 25.11.2011, 11:28
Re: OnPlayerTakeDamage, помогите - by Stepan23 - 25.11.2011, 11:30
Re: OnPlayerTakeDamage, помогите - by White_116 - 25.11.2011, 11:33
Re: OnPlayerTakeDamage, помогите - by Stepan23 - 25.11.2011, 11:40

Forum Jump:


Users browsing this thread: 1 Guest(s)