SA-MP Forums Archive
Kicks comand - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Kicks comand (/showthread.php?tid=301785)



Kicks comand - Super_Panda - 05.12.2011

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;
}



Re: Kicks comand - VanHalen9898 - 05.12.2011

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


Respuesta: Kicks comand - Super_Panda - 05.12.2011

Im asking how to make that >_>


Re: Kicks comand - grand.Theft.Otto - 05.12.2011

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;
}



Respuesta: Kicks comand - Super_Panda - 05.12.2011

Dude, Read above!

A KICKS command.

It shows which players has been kicked.


Re: Respuesta: Kicks comand - Thresholdold - 06.12.2011

EDIT: Didn't read post properly... my bad.


Re: Kicks comand - grand.Theft.Otto - 06.12.2011

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.


Re: Kicks comand - VanHalen9898 - 06.12.2011

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