12.05.2018, 12:37
Hi
try-
try-
PHP код:
//Under OnPlayerDeath
new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid,string[125];
if(gTeam[killerid] == PoliceTeam(GetPlayerSkin(playerid)) && gTeam[playerid] != RobberTeam(GetPlayerSkin(playerid)))
{
if(GetPlayerWantedLevel(playerid) <= 4 && GetPlayerWantedLevel(playerid) >= 30)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
GetPlayerName(killerid,tName,MAX_PLAYER_NAME);
format(string, sizeof(string), "{E6FD00}Officer %s[%d] has {00E6FD}Taken Down {E6FD00}%s[%d] which is at wanted level of %d!", tName, killerid, pName, playerid, GetPlayerWantedLevel(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);
}
}