OnPlayerTakeDamage
#2

Brackets fixed.

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
if(
StrategyArmy == 1)
{
    new 
Floathealth;
    
GetPlayerHealth(playerid,health);
    switch(
weaponid)
    {
        case 
31SetPlayerHealth(playerid,health-30);
        case 
24SetPlayerHealth(playerid,health-30);
        case 
35SetPlayerHealth(playerid,health-40);
    }
}
    if(
StrategyArmy == 2)
    {
    new 
Floathealth;
    
GetPlayerHealth(playerid,health);
    switch(
weaponid)
    {
        case 
34SetPlayerHealth(playerid,health-60);
        case 
25SetPlayerHealth(playerid,health-30);
        case 
16SetPlayerHealth(playerid,health-70);
    }
    }
    if(
StrategyTerror == 1)
    {
    new 
Floathealth;
    
GetPlayerHealth(playerid,health);
    switch(
weaponid)
    {
        case 
31SetPlayerHealth(playerid,health-30);
        case 
24SetPlayerHealth(playerid,health-30);
        case 
35SetPlayerHealth(playerid,health-40);
    }
    }
    if(
StrategyTerror == 2)
    {
    new 
Floathealth;
    
GetPlayerHealth(playerid,health);
    switch(
weaponid)
    {
        case 
34SetPlayerHealth(playerid,health-60);
        case 
25SetPlayerHealth(playerid,health-30);
        case 
16SetPlayerHealth(playerid,health-70);
    }
    }
    if(
issuerid != INVALID_PLAYER_ID && weaponid == 4)
    {
         
//One shot to kill with knife
        
SetPlayerHealth(playerid0.0);
   }
return 
1;

Reply


Messages In This Thread
OnPlayerTakeDamage - by Tamer - 12.01.2013, 18:30
Re: OnPlayerTakeDamage - by ThePhenix - 12.01.2013, 18:41
Re: OnPlayerTakeDamage - by zSuYaNw - 12.01.2013, 18:43

Forum Jump:


Users browsing this thread: 1 Guest(s)