Kicks comand
#1

How to make a

/kicks command,

Send a message like /reports

%s (%d) Kicked %s for %s.
%s (%d) Kicked %s for %s.
%s (%d) Kicked %s for %s.



pawn Код:
dcmd_reports(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 1) {
        new ReportCount;
        for(new i = 1; i < MAX_REPORTS; i++)
        {
            if(strcmp( Reports[i], "<none>", true) != 0) { ReportCount++; SendClientMessage(playerid,COLOR_WHITE,Reports[i]); }
        }
        if(ReportCount == 0) SendClientMessage(playerid,COLOR_WHITE,"There have been no reports");
    } else SendClientMessage(playerid,red,"ERROR: Necesitas ser nivel 1 para usar este comando!");
    return 1;
}
Reply
#2

So is this a release? If so, there is a section for all that good stuff
Reply
#3

Im asking how to make that >_>
Reply
#4

Untested, should work. Remember to add dcmd(kick,4,cmdtext); under OnPlayerCommandText.

pawn Код:
dcmd_kick(playerid,params[])
{
    new string[128], aname[24], pname[24], id, reason[50];
   
    if(sscanf(params,"us[50]",id,reason)) return SendClientMessage(playerid,-1,"USAGE: /kick [playerid] [reason]");
   
    GetPlayerName(playerid,aname,24); // admin
    GetPlayerName(id,pname,24); // target
   
    if(IsPlayerConnected(id))
    {
        format(string,128,"Admin  %s (%d)  Has Kicked  %s (%d).  Reason:  %s",aname,playerid,pname,playerid, reason);
        print(string); // print to console
        SendClientMessageToAll(-1,string);
        Kick(id);
    }
    return 1;
}
Reply
#5

Dude, Read above!

A KICKS command.

It shows which players has been kicked.
Reply
#6

EDIT: Didn't read post properly... my bad.
Reply
#7

No, he means a " /kicks " command - displays what players were kicked, in a list style.

Right now I don't have time to make it, sorry.
Reply
#8

use an admin FS that has already been released. It's a big time saver.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)