12.05.2018, 12:26
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid,string[125];
if(gTeam[playerid] == PoliceTeam(GetPlayerSkin(playerid)))
{
if(GetPlayerWantedLevel(playerid) <= 4 && GetPlayerWantedLevel(playerid) >= 30)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
format(string, sizeof(string), "{E6FD00}%s[%d] has been {00E6FD}Taken Down {ffffff}by Officer %s[%d]!", killerid,pName,playerid);
SendClientMessageToAll(-1,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
new Randomm = random(sizeof(RandommJailSpawns));
SetPlayerPos(playerid, RandommJailSpawns[Randomm][0], RandommJailSpawns[Randomm][1], RandommJailSpawns[Randomm][2]);
SetPlayerFacingAngle(playerid, RandommJailSpawns[Randomm][2]);
SetPlayerInterior(playerid, 3);
pJailTimerID[playerid] = SetTimerEx("pJailTimer", 1000, true, "i", playerid);
pJailCount[playerid] = 80 + random(100);
ResetPlayerWeapons(playerid);
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerWantedLevel(playerid,0);
SetPlayerHealth(playerid, 5000000);
return 1;
}
}
return 1;
}