Need Help.
#2

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID// If not self-inflicted
    
{
        
PlayerShotPlayer[issuerid][playerid] = 1;
        new 
Float:HP;
        
GetPlayerHealth(playeridHP);
        if(
team[issuerid] != team[playerid])
        {
            if(
weaponid == 4)
            {
                
SetPlayerHealth(playeridHP-35);
            }
        }
        if(
team[issuerid] == TEAM_HUMAN)
        {
            if(
pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pVipKickBack] == || pInfo[issuerid][pKickBackCoin])
            {
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    if(
weaponid == 23 || weaponid == 25 || weaponid == 24 || weaponid == 34 || weaponid == 31)
                    {
                        new 
Float:x,Float:y,Float:z,Float:angle;
                        
GetPlayerFacingAngle(playerid,Float:angle);
                        
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
                        
SetPlayerVelocity(playerid,Float:x+0.1,Float:y+0.1,Float:z+0.2);
                        
SetPlayerFacingAngle(playerid,Float:angle);
                    }
                }
               }
        }
        if(
team[issuerid] == TEAM_HUMAN)
        {
            if(
pInfo[issuerid][pHumanClass] == VIPSCOUT)
            {
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    if(
weaponid == 34)
                    {
                        
SetPlayerHealth(playerid, -0);
                    }
                }
            }
        }
        if(
team[issuerid] == TEAM_HUMAN)
        {
            if(
pInfo[issuerid][pHumanClass] == SCOUT || pInfo[issuerid][pHumanClass] == HEAVYSHOTGUN || pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pDamageShotgunCoin] == 1)
            {
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    if(
weaponid == 34 || 25)
                    {
                        new 
Float:hp;
                        
GetPlayerHealth(playerid,hp);
                        
SetPlayerHealth(playeridhp 45);
                    }
                }
            }
        }
        if(
team[issuerid] == TEAM_HUMAN)
        {
            if(
pInfo[issuerid][pDamageMP5Coin] == || pInfo[issuerid][pDamageDeagleCoin] == 1)
            {
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    if(
weaponid == 24 || 29)
                    {
                        new 
Float:hp;
                        
GetPlayerHealth(playerid,hp);
                        
SetPlayerHealth(playeridhp 45);
                    }
                }
            }
        }
        if(
team[issuerid] == TEAM_HUMAN)
        {
            if(
pInfo[issuerid][pHumanClass] == SNIPER)
            {
                if(
team[playerid] == TEAM_ZOMBIE)
                {
                    if(
weaponid == 34 && bodypart == 9)
                    {
                        
SetPlayerHealth(playerid, -0);
                        
GameTextForPlayer(playerid"~n~~r~HEADSHOT"30003);
                        
GameTextForPlayer(issuerid"~n~~g~HEADSHOT"30003);
                        new 
Float:xFloat:yFloat:zFloat:fDistancehsMessage[90], KName[MAX_PLAYER_NAME], PName[MAX_PLAYER_NAME];
                        
GetPlayerPos(playeridxyz);
                        
fDistance GetPlayerDistanceFromPoint(issueridxyz);
                        
GetPlayerName(issueridKNameMAX_PLAYER_NAME);
                        
GetPlayerName(playeridPNameMAX_PLAYER_NAME);
                        
format(hsMessagesizeof(hsMessage), "{DC143C}%s has Headshotted {FFFFFF}%s{DC143C} from the distance of %0.2f"KNamePNamefDistance);
                        
SendClientMessageToAll(-1hsMessage);
                        
pInfo[issuerid][pHeads]++;
                       }            
                 }
             }    
        }
    }
    return 
1;

Reply


Messages In This Thread
Need Help. - by ongnung147 - 14.05.2017, 02:26
Re: Need Help. - by Dice_ - 14.05.2017, 06:11
Re: Need Help. - by ongnung147 - 14.05.2017, 06:35
Re: Need Help. - by zedshadowzw - 15.05.2017, 11:58

Forum Jump:


Users browsing this thread: 2 Guest(s)