Raised This Month: $ Target: $400
 0% 

access flag m


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
decessed
Member
Join Date: Jun 2009
Location: Russia - United Kingdom
Old 08-09-2009 , 12:52   access flag m
Reply With Quote #1

PHP Code:
AMX Mod X script.
*
*  
Admin Screen 2 v1.0 by uTg bigpapajiggs
*
*  
Based on Admin Screen by Rav
*
*  
amx_screen <authid/nick/userid> <number of screens>
*
*/ 

#include <amxmodx>
#include <amxmisc>

new player

//PCVAR
new maxssssintervaltimestamptype

public plugin_init() 

    
register_plugin("Admin Screen 2""1.1""uTg | bigpapajiggs")
    
    
register_concmd("amx_screen""concmd_screen"ADMIN_LEVEL_A"<authid, nick or #userid> <screens>")
    
    
maxss register_cvar("amx_maxscreens""10")
    
ssinterval register_cvar("amx_ssinterval""1.0")
    
timestamptype register_cvar("amx_timestamptype""3")
}

public 
concmd_screen(idlevelcid)

    
//Is the amx_screen'er an admin?
    
if(!cmd_access(idlevelcid3))
    {
        return 
PLUGIN_HANDLED
    
}
    
    
//Read the arguements
    
new arg1[24], arg2[4]
    
read_argv(1arg123)
    
read_argv(2arg23)
    
    new 
screens str_to_num(arg2)
    new 
maxscreens get_pcvar_num(maxss)
    
    
//Let us make sure that there aren't too many screenshots taken
    
if(screens maxscreens)
    {
        
console_print(id"[AMXX] You cannot take that many screenshots!")
        
        return 
PLUGIN_HANDLED
    
}
    
    
//Does the target exist?
    
player cmd_target(idarg11)
    if (!
player)
    {
        return 
PLUGIN_HANDLED
    
}
    
    
//How many screenshots?
    
new Float:interval get_pcvar_float(ssinterval)
    new array[
2]
    array[
0] = id
    
array[1] = player
    set_task
(interval"takeScreen"0, array,2"a"screens)
        
    return 
PLUGIN_HANDLED
}
 
public 
takeScreen(array[2])
{
    new 
player = array[1]
    new 
id = array[0]
            
    
//Get time, admin name, and target name
    
new timestamp[32], timestampmsg[128], name[32], adminname[32]
    
get_time("%m/%d/%Y - %H:%M:%S"timestamp31)
    
get_user_name(playername31)
    
get_user_name(idadminname31)
            
    
//No timestamp
    
if(get_pcvar_num(timestamptype) == 0)
    {
        
client_print(playerprint_chat"** Screenshot taken on player ^"%s^" by admin ^"%s^" **"nameadminname)
        
        
//Take the screenshot
        
client_cmd(player"snapshot")
    }
    
//Client Print only
    
else if(get_pcvar_num(timestamptype) == 1)
    {
        
//client_print Timestamp Message
        
client_print(playerprint_chat"** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **"nameadminnametimestamp)
     
        
//Take the screenshot
        
client_cmd(player"snapshot")
    }
    
//HUD Message only
    
else if(get_pcvar_num(timestamptype) == 2)
    {
        
//HUD Timestamp Message
        
set_hudmessage(player2550, -1.00.300.251.00.00.04)
        
format(timestampmsg127"** TIMESTAMP - %s **"timestamp)
        
show_hudmessage(playertimestampmsg)
        
        
//Take the screenshot
        
client_cmd(player"snapshot")
    }
    
//Both
    
else if(get_pcvar_num(timestamptype) == 3)
    {
        
//HUD Timestamp Message
        
set_hudmessage(player2550, -1.00.300.251.00.00.04)
        
format(timestampmsg127"** TIMESTAMP - %s **"timestamp)
        
show_hudmessage(playertimestampmsg)
            
        
//client_print Timestamp Message
        
client_print(playerprint_chat"** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **"nameadminnametimestamp)
     
        
//Take the screenshot
        
client_cmd(player"snapshot")
    }
    return 
PLUGIN_CONTINUE


Help please!
This plug-in works only then when the administrator access has a flag "m" how to make that it worked when at the administrator will stand accеss "f"

Thanks for the help from me karma ++
decessed is offline
Send a message via Skype™ to decessed
 



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 18:20.


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