/warn Commmand
#10

Quote:
Originally Posted by Jafet_Macario
Посмотреть сообщение
Cjgogo edit:
pawn Код:
new Warnings[MAX_PLAYERS]; // TOP


Warnings[playerid] = 0; // OnPlayerConnect

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid==DIALOG_WARN) //
    {
        if(response==0) return SendClientMessage(playerid,COLOR_RED,"Operation aborted");
        if(response==1)
        {
            if(!strlen(inputtext)) return SendClientMessage(playerid,COLOR_RED,"You didn't type anything in the box");
            new pID = clickedplayerid;
            new wName[MAX_PLAYER_NAME];
            GetPlayerName(pID,wName,sizeof(wName));
            new string[120];
            format(string,sizeof(string),"%s(%d) has been warned by an admin.Reason:%s",wName,pID,inputtext);
            SendClientMessageToAll(COLOR_RED,string);
            Warnings[pID] += 1;
            if(Warnings[pID] >= 3)
            {
                SendClientMessage(pID, -1, "3/3 Warnings, kicked"):
                Kick(pID);
            }
        }
    }
    return true;
}
Thanks Problem Solved
Reply


Messages In This Thread
/warn Commmand - by V_LOPE - 30.09.2011, 17:58
Re: /warn Commmand - by V_LOPE - 01.10.2011, 02:43
Re: /warn Commmand - by Yamoo - 01.10.2011, 02:44
Re: /warn Commmand - by Super_Panda - 01.10.2011, 03:02
Re: /warn Commmand - by grand.Theft.Otto - 01.10.2011, 04:12
Re: /warn Commmand - by V_LOPE - 01.10.2011, 04:26
Re: /warn Commmand - by Cjgogo - 01.10.2011, 06:23
Re: /warn Commmand - by V_LOPE - 01.10.2011, 07:42
Re: /warn Commmand - by Jafet_Macario - 01.10.2011, 07:46
Re: /warn Commmand - by V_LOPE - 01.10.2011, 08:31

Forum Jump:


Users browsing this thread: 1 Guest(s)