Cases
#2

Hey Sir!

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    if(
issuerid != INVALID_PLAYER_ID/// If not self-inflicted
    
{
        if(
gTeam[issuerid] != PoliceTeam(GetPlayerSkin(playerid)) && !SWAT(GetPlayerSkin(playerid)) && !Army(GetPlayerSkin(playerid)) && !FBII(GetPlayerSkin(playerid)) && !CIA(GetPlayerSkin(playerid))) // If we wasn't in the team of the guys who damage him.
        
{
            switch(
issuerid)
            {
                case 
0:
                {
                    
SetPlayerWantedLevel(issueridGetPlayerWantedLevel(issuerid) + 4);
                    
SetPlayerColor(issueridCOLOR_ORANGE);
                    
SendClientMessage(issueridCOLOR_ORANGE"{FF8300}[WANTED LEVEL INCREASED]: YOU PUSHING A POLICE MAN AND YOUR WANTED LEVEL ARE INCREASED +4.");
                    
GameTextForPlayer(issuerid"~R~RUN~G~RUN~P~RUN"50005);
                    
SendClientMessage(issuerid, -1"{FF0000}NOTE: {FFFFFF}If you think it was a abuse pushing by the Police Please {FF0000}/complain(/c) {FFFFFF}him.");
                    
PushingPoliceMan[issuerid] = SetTimerEx("ResetPushingPoliceMan"300000"i"issuerid);
                    
PushingPoliceMan[issuerid] = -1;
                    
PlayerPlaySound(issuerid158670.0,0.0,5.0);
                    
format(fstr2sizeof(fstr2), "{FF8300}[INCREASED]: {FFFFFF}Player {0080FF}%s(%d) {FFFFFF}his wanted level are {FF8300}INCREASED {FFFFFF}because he pushing/shooting you!!!",TargetName(issuerid), issuerid);
                    
SendClientMessage(playerid, -1fstr2);
                    
PlayerPlaySound(playerid96390.0,0.0,5.0);

                    
format(fstrsizeof(fstr), "[WANTED INCREASED]: Player %s(%d) his wanted level are increased because he Pushing / Shooting %s(%d)."TargetName(issuerid), issueridGetName(playerid), playerid);
                    
CopRadio(COLOR_DODGERBLUEfstr);
                    return 
1;
                }
                case 
1:
                {
                    new 
Float:HP;
                    if(
PoliceTeam(GetPlayerSkin(playerid)) && !SWAT(GetPlayerSkin(playerid)) && !Army(GetPlayerSkin(playerid)) && !FBII(GetPlayerSkin(playerid)) && !CIA(GetPlayerSkin(playerid)))
                    
GetPlayerHealth(playeridHP);
                    
PlayerPlaySound(playerid108050.0,0.0,5.0);
                    
SetPlayerHealth(playeridHP-0); // Get the weapon wich he got damaged and set the damage to 0.
                    
PlayerPlaySound(issuerid70470.0,0.0,5.0);
                    return 
1;
                }
                case 
2:
                {
                    new 
Float:HP;
                    if(
FireFighter(GetPlayerSkin(issuerid)) != PoliceTeam(GetPlayerSkin(playerid)) && !SWAT(GetPlayerSkin(playerid)) && !Army(GetPlayerSkin(playerid)) && !FBII(GetPlayerSkin(playerid)) && !CIA(GetPlayerSkin(playerid)))
                    
GetPlayerHealth(playeridHP);
                    
PlayerPlaySound(playerid108050.0,0.0,5.0);
                    
SetPlayerHealth(playeridHP-0); // Get the weapon wich he got damaged and set the damage to 0.
                    
PlayerPlaySound(issuerid70470.0,0.0,5.0);
                    return 
1;
                }
            }
        }
    }
    return 
1;

Try it.
Reply


Messages In This Thread
Cases - by Thanks - 05.02.2019, 23:42
Re: Cases - by RedRex - 05.02.2019, 23:54
Re: Cases - by TheToretto - 06.02.2019, 06:20

Forum Jump:


Users browsing this thread: 1 Guest(s)