Raised This Month: $ Target: $400
 0% 

Ban Player With Screenshot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 03-11-2007 , 15:33   Re: Ban Player With Screenshot
Reply With Quote #1

oh, my plugin
Get it:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>


#define PLUGIN "Ban with Snapshot"
#define VERSION "0.3"
#define AUTHOR "SAMURAI"

new gBanData[33][2][32]

  
public 
plugin_init() {
        
register_plugin(PLUGINVERSIONAUTHOR)
        
register_concmd("amx_banss""cmdBanss"ADMIN_BAN"<name or #userid> <minutes> [reason]")
}

 

public 
cmdBanss(idlevelcid) {

    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED    

    
new target[32], minutes[8], reason[64]

       
    
read_argv(1target31)   
    
read_argv(2minutes7)
    
read_argv(3reason63)
   
    new 
player cmd_target(idtarget9)
   
    if (!
player)
        return 
PLUGIN_HANDLED
     
    copy
(gBanData[player][0], 31minutes)
    
copy(gBanData[player][1], 31reason)
       
    new 
TaskData[4]
    
TaskData[0] = id

    TaskData
[1] = player
        
    
new hostname[64], tname[32], usrip[32], timer[32];
    
get_cvar_string("hostname",hostname,63);
    
get_user_name(player,tname,31);
    
get_user_ip(player,usrip,31);
    
get_time("%m/%d/%Y - %H:%M:%S"timer,31);
         
    
client_print(player,print_chat,"* Screenshot was made on : %s",hostname)
    
client_print(playerprint_chat"* Nick:  ^"%s^" with IP : %s",tname,usrip)
    
client_print(playerprint_chat"* Date : %s",timer)
    
client_print(playerprint_chat"* Visit XXX for Unban.")

    
console_print(player,"* Screenshot was made on : %s",hostname)
    
console_print(player"* Nick:  ^"%s^" with IP : %s",tname,usrip)
    
console_print(player"* Date : %s",timer)
    
console_print(player"* Visit XXX for Unban.")
    
client_cmd(player,"wait;snapshot;wait;snapshot")

        
set_task(0.5"fnBanUser"0TaskData2)

       

        return 
PLUGIN_HANDLED

}

 

public 
fnBanUser(Data[]) {

    new 
id Data[0]

    new 
player Data[1]

       

    if (!
is_user_connected(id))

        return 
PLUGIN_HANDLED

       

    
new minutes[32], reason[32]

    
copy(minutes31gBanData[player][0])

    
copy(reason31gBanData[player][1])

       

    new 
authid[32], name2[32], authid2[32], name[32]

    new 
userid2 get_user_userid(player)

       

    
get_user_authid(playerauthid231)

    
get_user_authid(idauthid31)

    
get_user_name(playername231)

    
get_user_name(idname31)

               

    
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%s^") (reason ^"%s^")"nameget_user_userid(id), authidname2userid2authid2minutesreason)

 

    new 
temp[64], banned[16], nNum str_to_num(minutes)

    if (
nNum)

        
format(temp63"%L"player"FOR_MIN"minutes)

    else

        
format(temp63"%L"player"PERM")

    
format(banned15"%L"player"BANNED")
    
       

    new 
timeS[32]
 
    
get_time("%m/%d/%Y - %H:%M:%S"timeS,31)
        
     
    new 
address[32]

    
get_user_ip(playeraddress311)

    new 
hostname[64]
    
get_cvar_string("hostname",hostname,63)
    
    new 
activity get_cvar_num("amx_show_activity")

    if (
activity != 0)

    {

                new 
players[32], pnummsg[256], len

                get_players
(playerspnum"c")

               

                for (new 
0pnumi++)
                {

        
len format(msg255"%L"players[i], "ADMIN")

                       

        if (
activity == 1)

            
len += copy(msg[len], 255-len":")

        else

            
len += format(msg[len], 255-len" %s:"name)
                   

        
len += format(msg[len], 255-len" %L"players[i], "BAN")
        
len += format(msg[len], 255-len" %s "name2)
             
        if (
nNum)

            
format(msg[len], 255-len"%L"players[i], "FOR_MIN"minutes)
        else
            
format(msg[len], 255-len"%L"players[i], "PERM")
                   
        
client_print(players[i], print_chat"%s"msg)

                }

        }

        
console_print(id"[AMXX] %L"id"CLIENT_BANNED"name2)

    if (
reason[0])
                
server_cmd("kick #%d ^"%(%%s)^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2reasonbannedtempminutesaddress)

    else
                
server_cmd("kick #%d ^"%%s^";wait;addip ^"%s^" ^"%s^";wait;writeip"userid2bannedtempminutesaddress)


        return 
PLUGIN_HANDLED  

SAMURAI16 is offline
Send a message via MSN to SAMURAI16
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-11-2007 , 15:42   Re: Ban Player With Screenshot
Reply With Quote #2

Yep, Thanks man!
__________________
We live in a world where PIZZA arrives faster than the Police !

Last edited by The_Ghost; 03-11-2007 at 15:46.
The_Ghost is offline
Send a message via Skype™ to The_Ghost
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 10-09-2007 , 13:19   Re: Ban Player With Screenshot
Reply With Quote #3

some1 can help me to make it to work whit amxbans?
hcxx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode