16.06.2010, 23:49
Couldn't find anything like checking who killed who.
I want to make it so if they are not in a deathmatch and they kill anyone that they will get auto kicked from the server. Useful for annoying people killing in stunts and to get rid of hackers.
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid[killed] killerid && PlayerIsInDM(playerid) == false;
{
Kick(playerid);
}
}
Obviously it wouldn't be close to that code at all but how would I do this?
//EDIT when a player say suicides it just says "KICKED: has been auto kicked by console."
Code:
I want to make it so if they are not in a deathmatch and they kill anyone that they will get auto kicked from the server. Useful for annoying people killing in stunts and to get rid of hackers.
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid[killed] killerid && PlayerIsInDM(playerid) == false;
{
Kick(playerid);
}
}
Obviously it wouldn't be close to that code at all but how would I do this?
//EDIT when a player say suicides it just says "KICKED: has been auto kicked by console."
Code:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerIsInDM[playerid] == false)
{
new string [128];
new pName2[MAX_PLAYER_NAME];
GetPlayerName(killerid, pName2, sizeof(pName2));
format(string, sizeof(string), "KICKED: %s has been auto kicked by console.", pName2);
SendClientMessageToAll(COLOR_RED, string);
Kick(killerid);
}