Need help! - Crime - Wanted Levels
#6

here you go some quick examples just change the gTeam to your own team variable and stuff that you need to change in the code

Here You Go
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && gTeam[playerid] == TEAM_CIVILIAN)
    {
        new
            string[128],
            name[24],
            pname[24]
        ;
        GetPlayerName(issuerid, name, sizeof(name));
        GetPlayerName(playerid, pname, sizeof(pname));
        //
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+2);
        format(string,sizeof(string),"[ASSAULT] %s[%d] is firing gun shots to %s[%d]",name,issuerid,pname,playerid);
        SendClientMessageToAll(-1,string);
    }
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {  
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 416 && gTeam[playerid] == TEAM_CIVILIAN)
        {
        new
            string[128],
            pname[24]
        ;
            GetPlayerName(playerid, pname, sizeof(pname));
            SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+2);
            format(string,sizeof(string),"[GTA] %s[%d] has stolen a Ambulance. Police watch out!",pname);
            SendClientMessageToAll(-1,string);
       
        }
    }
    return 1;
}
PS i did not use OnPlayerEnterVehicle because OnPlayerStateChange is what people always use for CnR
Reply


Messages In This Thread
Need help! - Crime - Wanted Levels - by Uberanwar - 28.03.2013, 10:56
Re: Need help! - Crime - Wanted Levels - by Patrick - 28.03.2013, 10:58
Re: Need help! - Crime - Wanted Levels - by Uberanwar - 28.03.2013, 11:03
Re: Need help! - Crime - Wanted Levels - by Patrick - 28.03.2013, 11:04
Re: Need help! - Crime - Wanted Levels - by Uberanwar - 28.03.2013, 11:08
Re: Need help! - Crime - Wanted Levels - by Patrick - 28.03.2013, 11:30

Forum Jump:


Users browsing this thread: 2 Guest(s)