This hard this time
#10

Use one wString not 8!
top
pawn Код:
new warnings[YOUR_MAX_PLAYERS];
connect/disconnect
pawn Код:
warnings[playerid]=0;
pawn Код:
dcmd_warn(playerid, params[])
{
    new warnID, Reason[128];
    if(Player[playerid][admin] < 1) return 0;
    if(sscanf(params,"us",warnID, Reason)) SendClientMessage(playerid, COLOR_GREY, "|| Usage: /warn [playerid] [reason] ||");
    else if(!IsPlayerConnected(warnID)) SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
    else{
        new wString[128],Name[MAX_PLAYER_NAME],aname[MAX_PLAYER_NAME];

        warnings[warnID]++;
        if(0 < warnings[warnID] < 3) {
            GetPlayerName(warnID,Name,MAX_PLAYER_NAME);
            GetPlayerName(playerid,aname,MAX_PLAYER_NAME);
            format(wString,sizeof(wString), "**(ADMIN WARN)** %s(%d) %s",Name, warnID, Reason);
            SendClientMessageToAll(gold, wString);
            format(wString,sizeof(wString), "You Have WARN %s(%d) For Reason: %s",Name, warnID,Reason);
            SendClientMessage(playerid,COLOR_GREEN, wString);
            format(wString,sizeof(wString), "You Have Been WARNED By Admin For Reason: %s",Reason);
            SendClientMessage(warnID, f, wString);
            format(wString,sizeof(wString), "Admin %s(%d) Has WARN %s(%d) For Reason: %s",aname,playerid,Name,warnID,Reason);
            SendAdminMessage(gold, wString);
            SaveToFile("Warns", wString);
            return 1;
        }
        format(wString,sizeof(wString), "**(AUTO KICK)** %s(%d) %s",Name, warnID, Reason);
        SendClientMessageToAll(gold, wString);
        format(wString,sizeof(wString), "You Have KICK %s(%d) For Reason: %s",Name, warnID,Reason);
        SendClientMessage(playerid,COLOR_GREEN, wString);
        format(wString,sizeof(wString), "You Have Been AUTO KICK By Server For Reason: %s",Reason);
        SendClientMessage(warnID, f, wString);
        format(wString,sizeof(wString), "Admin %s(%d) Has KICK %s(%d) For Reason: %s",aname,playerid,Name,warnID,Reason);
        SendAdminMessage(gold, wString);
        SaveToFile("Auto KICKS", wString);
        Kick(warnID);
    }
    return 1;
}
Reply


Messages In This Thread
This hard this time - by [MKD]Max - 31.01.2011, 13:22
Re: This hard this time - by bartje01 - 31.01.2011, 13:24
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:29
Re: This hard this time - by bartje01 - 31.01.2011, 13:31
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:32
Re: This hard this time - by bartje01 - 31.01.2011, 13:32
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:34
Re: This hard this time - by bartje01 - 31.01.2011, 13:44
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:50
Re: This hard this time - by Jefff - 31.01.2011, 13:59

Forum Jump:


Users browsing this thread: 4 Guest(s)