03.07.2018, 22:01
Guys!! How to fix this? When I joined a cop skin and killed who wanted level +4 or +30 It's worked only for Officers it's dose not work for FBI,SWAT,CIA,ARMY It's worked only for Police HOW TO MAKE IT WORKED FOR ALL POLICE TEAM!?
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid;
new string[100 + MAX_PLAYER_NAME];
if(gTeam[playerid] == Civilian(GetPlayerSkin(playerid) && gTeam[killerid] == PoliceTeam(GetPlayerSkin(killerid))))
{
if(gTeam[killerid] == PoliceTeam(GetPlayerSkin(killerid) && GetPlayerWantedLevel(playerid) >= 4 && GetPlayerWantedLevel(playerid) <= 30))
{
if(GetPlayerWantedLevel(playerid) >= 1 && GetPlayerWantedLevel(playerid) <= 3) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
if(GetPlayerWantedLevel(playerid) == 0) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
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), "{F3FF33}%s[%d] {ffffff}has been {00E6FD}Taken Down {ffffff}by {E6FD00}Officer %s[%d] {ffffff}Wanted: %d{ffffff}!", pName, playerid, tName, killerid, GetPlayerWantedLevel(playerid));
SendClientMessageToAll(yellow,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
BeginArrestedTime[playerid] = SetTimerEx("JailPlayer",2000,0,"i",playerid);// making 5 sec timer for jail
BeginArrested[playerid] = 1;
return 1;
}
}
if(gTeam[playerid] == Civilian(GetPlayerSkin(playerid) && gTeam[killerid] == SWAT(GetPlayerSkin(killerid))))
{
if(gTeam[killerid] == SWAT(GetPlayerSkin(killerid) && GetPlayerWantedLevel(playerid) >= 4 && GetPlayerWantedLevel(playerid) <= 30))
{
if(GetPlayerWantedLevel(playerid) == 0) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
if(GetPlayerWantedLevel(playerid) >= 1 && GetPlayerWantedLevel(playerid) <= 3) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
BeginArrested[playerid] = 1;
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), "{F3FF33}%s[%d] {ffffff}has been {00FFFF}Taken Down {ffffff}by {00FFFF}S.W.A.T Special Forces {308AFF}%s(%d) {ffffff}which is at wanted level of {00E6FD}%d{ffffff}!", pName, playerid, tName, killerid, GetPlayerWantedLevel(playerid));
SendClientMessageToAll(yellow,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
BeginArrestedTime[playerid] = SetTimerEx("JailPlayer",2000,0,"i",playerid);// making 5 sec timer for jail
BeginArrested[playerid] = 1;
return 1;
}
}
if(gTeam[playerid] == Civilian(GetPlayerSkin(playerid) && gTeam[killerid] == Army(GetPlayerSkin(killerid))))
{
if(gTeam[killerid] == Army(GetPlayerSkin(killerid) && GetPlayerWantedLevel(playerid) >= 4 && GetPlayerWantedLevel(playerid) <= 30))
{
if(GetPlayerWantedLevel(playerid) == 0) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
if(GetPlayerWantedLevel(playerid) >= 1 && GetPlayerWantedLevel(playerid) <= 3) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
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), "{F3FF33}%s[%d] {ffffff}has been {00E6FD}Taken Down {ffffff}by {932EE7}San Andreas Army {308AFF}%s(%d){ffffff}which is at wanted level of {00E6FD}%d{ffffff}!", pName, playerid, tName, killerid, GetPlayerWantedLevel(playerid));
SendClientMessageToAll(yellow,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
BeginArrestedTime[playerid] = SetTimerEx("JailPlayer",2000,0,"i",playerid);// making 5 sec timer for jail
BeginArrested[playerid] = 1;
return 1;
}
}
if(gTeam[playerid] == Civilian(GetPlayerSkin(playerid) && gTeam[killerid] == CIA(GetPlayerSkin(killerid))))
{
if(gTeam[killerid] == CIA(GetPlayerSkin(killerid) && GetPlayerWantedLevel(playerid) >= 4 && GetPlayerWantedLevel(playerid) <= 30))
{
if(GetPlayerWantedLevel(playerid) == 0) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
if(GetPlayerWantedLevel(playerid) >= 1 && GetPlayerWantedLevel(playerid) <= 3) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
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), "{F3FF33}%s[%d] {ffffff}has been {00E6FD}Taken Down {ffffff}by {FFFFFF}Central Intelligence Agency {308AFF}%s(%d){ffffff}which is at wanted level of {00E6FD}%d{ffffff}!", pName, playerid, tName, killerid, GetPlayerWantedLevel(playerid));
SendClientMessageToAll(yellow,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
BeginArrestedTime[playerid] = SetTimerEx("JailPlayer",2000,0,"i",playerid);// making 5 sec timer for jail
BeginArrested[playerid] = 1;
return 1;
}
}
if(gTeam[playerid] == Civilian(GetPlayerSkin(playerid) && gTeam[killerid] == FBII(GetPlayerSkin(killerid))))
{
if(gTeam[killerid] == FBII(GetPlayerSkin(killerid) && GetPlayerWantedLevel(playerid) >= 4 && GetPlayerWantedLevel(playerid) <= 30))
{
if(GetPlayerWantedLevel(playerid) == 0) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
if(GetPlayerWantedLevel(playerid) >= 1 && GetPlayerWantedLevel(playerid) <= 3) return SendClientMessage(killerid, -1, "{FF0000}[WARRING]: YOU CANNOT KILL PLAYERS WITHOUT NO REASON!! {ffffff}/RULES {ff0000}& {ffffff}/PC!{ff0000}!{ffffff}!");
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), "{F3FF33}%s[%d] {ffffff}has been {00E6FD}Taken Down {ffffff}by {308AFF}Federal Agent {308AFF}%s(%d){ffffff}which is at wanted level of {00E6FD}%d{ffffff}!", pName, playerid, tName, killerid, GetPlayerWantedLevel(playerid));
SendClientMessageToAll(yellow,string);
format(string, sizeof(string), "~b~Taken Down ~W~%s(%d)", pName, playerid);
GameTextForPlayer(killerid, string, 7000, 5);
BeginArrestedTime[playerid] = SetTimerEx("JailPlayer",2000,0,"i",playerid);// making 5 sec timer for jail
BeginArrested[playerid] = 1;
return 1;
}
}
return 1;
}