[HELP]Counter Not Working
#5

LOL, epic fail.

just epic srsly.

edit the Wanted to Warned.

didnt notice that either.

This should be works like a charm.
pawn Код:
dcmd_warn(playerid, params[])
{
    new targetid, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], reason[64], string[144];
    if(IsPlayerAdmin(playerid)||PlayerInfo[playerid][Level]>=2)
    {
        if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00FF00}[USAGE] {FFFFFF}/warn [PlayerID] [Reason]");
        GetPlayerName(playerid, aName, sizeof(aName));
        GetPlayerName(targetid, pName, sizeof(pName));
        if(IsPlayerConnected(targetid))|| if(PlayerInfo[targetid][Warned]==0)
        {
            ++PlayerInfo[targetid][Warned];
            format(string, sizeof(string), "{B0B0B0}[SERVER]{FFFFFF} Administrator {F52887}%s{FFFFFF} has warned {DFDFDF}%s{FFFFFF} Reason: {DFDFDF}%s", aName, pName, reason, PlayerInfo[targetid][Warned]);
            SendClientMessageToAll(COLOR_WHITE, string);
            format(string, sizeof(string), "{FFFF00}Warnings{FFFFFF}: {DFDFDF}%i{FFFFFF}/{FF0000}3", PlayerInfo[targetid][Warned]);
            SendClientMessageToAll(COLOR_WHITE, string);
        }
        if(PlayerInfo[targetid][Warned]==3)
        {
            Kick(targetid);
        }
    }
    else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[ERROR] {FFFFFF}You don't have the appropried administration level to use this command !");
    return 1;
}
Reply


Messages In This Thread
[HELP]Counter Not Working - by ApOcAlYpSe98 - 28.03.2014, 09:53
Re: [HELP]Counter Not Working - by Equuuuin0X - 28.03.2014, 09:59
Re: [HELP]Counter Not Working - by Niko_boy - 28.03.2014, 10:06
Re: [HELP]Counter Not Working - by ApOcAlYpSe98 - 28.03.2014, 10:08
Re: [HELP]Counter Not Working - by Equuuuin0X - 28.03.2014, 10:08
Re: [HELP]Counter Not Working - by ApOcAlYpSe98 - 28.03.2014, 10:12

Forum Jump:


Users browsing this thread: 1 Guest(s)