14.01.2012, 19:37
Yes it is possible heres a copy of mine however this won't work for you.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[killerid] == Team_Cop && GetPlayerWantedLevel(playerid) == 0)
{
SetPVarInt(playerid,"KickOnKill",GetPVarInt(playerid,"KickOnKill")+1);
PlayerInfo[playerid][pDeaths] ++;
PlayerInfo[killerid][pKills] ++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
if(gTeam[playerid] == Team_Cop && gTeam[killerid] == Team_Cop)
{
JailPlayer(playerid,1);
PlayerInfo[playerid][pDeaths] ++;
PlayerInfo[killerid][pKills] ++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
if(gTeam[playerid] == Team_Civil && HasLifeInsurance[playerid] == false)
{
new Rand = random(100000);
Safe_GivePlayerMoney(playerid, -(Rand));
new Insurance[128];
format(Insurance,sizeof(Insurance),"~n~~r~Paid Medical Fees~n~~n~~w~You paid $%d in medical fees.~n~~n~~w~You can reduce this by buying insurance at the City Hall.",Rand);
GameTextForPlayer(playerid,Insurance,5000,4);
PlayerInfo[playerid][pDeaths] ++;
PlayerInfo[killerid][pKills] ++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
if(gTeam[playerid] == Team_Civil && HasLifeInsurance[playerid] == true)
{
GameTextForPlayer(playerid,"~n~~w~Covered by life insurance.~n~~n~You are now ~r~not~w~ covered by life insurance.~n~~n~Visit the City Hall to buy more.",5000,4);
HasLifeInsurance[playerid] = false;
PlayerInfo[playerid][pDeaths] ++;
PlayerInfo[killerid][pKills] ++;
SendDeathMessage(killerid, playerid, reason);
return 1;
}
if(AdminOnDuty[killerid] == true)
{
GameTextForPlayer(playerid,"~y~Unfair death.~n~~n~~w~Continuing current life.~n~~n~Your stats will stay the same.",5000,4);
return 1;
}
if(DiedFromAdmin[playerid] == true)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid, 40);
return 1;
}
return 1;
}