Warnings
#7

Here you go.. Harish
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(ServerInfo[ReadPMs] == 1 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
    {
        new string[64],playername[MAX_PLAYER_NAME],recievername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        GetPlayerName(recieverid, recievername, sizeof(recievername));
        format(string, sizeof(string), "***PM: %s To %s: %s", playername,recievername, text);
        for (new a = 0; a < MAX_PLAYERS; a++)
        if (IsPlayerConnected(a) && (PlayerInfo[a][Level] >= 1) && a != playerid)
        SendClientMessage(a, COLOR_GREY, string);
    }

    if(PlayerInfo[playerid][Muted] == 1)
    {
        PlayerInfo[playerid][MuteWarnings]++;
        if(PlayerInfo[playerid][MuteWarnings] < 5) {
        SendClientMessage(playerid,red,"WARNING: You are muted, if you continue to speak you will be kicked");
        } else {
        SendClientMessage(playerid,red,"You have been warned ! Now you have been kicked");
        new string[100], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string),"%s [ID %d ] Kicked For exceeding Mute warnings", playername,playerid);
        SendClientMessageToAll(grey,string);
        SaveToFile("KickLog",string); Kick(playerid); }
        return 0;
    }
    return 1;
}
I already wrote in my admin script.. But still level 5 can become helper??
Reply


Messages In This Thread
Warnings - by iOmar - 06.04.2012, 08:21
Re: Warnings - by Harish - 06.04.2012, 09:05
Re: Warnings - by Reklez - 06.04.2012, 09:08
Re: Warnings - by iOmar - 06.04.2012, 09:53
Re: Warnings - by SimonItaly - 06.04.2012, 10:45
Re: Warnings - by Harish - 06.04.2012, 10:50
Re: Warnings - by iOmar - 06.04.2012, 12:12
Re: Warnings - by Reklez - 06.04.2012, 12:16
Re: Warnings - by MadeMan - 06.04.2012, 12:18
Re: Warnings - by Rob_Maate - 06.04.2012, 12:20

Forum Jump:


Users browsing this thread: 1 Guest(s)