19.08.2012, 22:32
actually i want to add a cop-ban t my server so those people who keep abusing with /ticket and killing innocents can learn a lesson so any one can help?
new Warnings[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
switch(Warnings)
{
case 0, 1, 2:
{
if(GetPlayerWantedLevel(playerid) == 0 && IsPlayerCop(killerid))
{
SendClientMessage(killerid, COLOR_RED, "WARNING: Stop killing innocent people or you will be banned!");
Warnings[killerid] = ++;
}
}
case 3:
{
if(GetPlayerWantedLevel(playerid) == 0 && IsPlayerCop(killerid))
{
SendClientMessage(killerid, COLOR_RED, "BAN: You have killed enoug innocent people, now you are banned!");
Ban(killerid);
}
}
}
return 1;
}