OnPlayerTakeDamage Problem
#1

PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    new 
string[128];
    if(
gTeam[issuerid] == TEAM_COP || gTeam[issuerid] == TEAM_ARMY || gTeam[issuerid] == TEAM_CIA || gTeam[issuerid] == TEAM_SWAT)
    {
        if(
gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY || gTeam[playerid] != TEAM_CIA || gTeam[playerid] != TEAM_SWAT)
        {
            if(
weaponid == 23)
            {
                
format(string,sizeof(string),"Police officer %s(%d) has tazed %s(%d).",PlayerName(issuerid),issuerid,PlayerName(playerid),playerid);
                
SendClientMessageToAll(COLOR_DODGERBLUE,string);
                
GameTextForPlayer(playerid"~b~TAZED~n~~w~FOR ~y~3~w~SECONDS"30005);
                
TogglePlayerControllable(playerid,0);
                
IsTazed[playerid] =3;
            }
        }
    }
    return 
1;

The problem is that when i shoot TEAM_COP , they also got tazed
Reply


Messages In This Thread
OnPlayerTakeDamage Problem - by nor15 - 17.07.2013, 05:16
Re: OnPlayerTakeDamage Problem - by xganyx - 17.07.2013, 06:04
Re: OnPlayerTakeDamage Problem - by nor15 - 17.07.2013, 06:06
Re: OnPlayerTakeDamage Problem - by xganyx - 17.07.2013, 06:23

Forum Jump:


Users browsing this thread: 2 Guest(s)