Raised This Month: $ Target: $400
 0% 

LNCCSS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xeonn
Junior Member
Join Date: Jun 2006
Old 06-24-2006 , 18:51   LNCCSS
Reply With Quote #1

Hi, im new with amxmodx coding, but it looks quite simple,

Oki; my question:
I want to make a script if a admin type amx_screenshot 180 in console the screenshot system creates every 3 mins a screenshot of everyplayer in the game.

This is what i got;

Code:
// Adminscript for AMXMODx by xeoN

#include <amxmodx> // Need to be included
#include <amxmisc>  // Need to be included
#include <engine> // Need to be included

public plugin_init(){
    register_plugin("LNCCSS","1.0","xeoN")
    register_clcmd("amx_screenshot","screenshot",ADMIN_SLAY,"<authid, nick or #userid>")
}

public resetview(id){attach_view(id,id);}
public screenshot(id,level,cid){
    if(cmd_access(id,level,cid,2)){
        new arg[32], player
        read_argv(1,arg,31)
        player=cmd_target(id,arg,6)
        if(player){
            attach_view(id,player)
            client_cmd(id,"snapshot")
            set_task(2.0,"resetview",id)
        }
    }
}
set_task( get_cvar_float("mycvar"), "screenshot", id );
Any suggestions/help ?

Last edited by xeonn; 06-24-2006 at 18:56.
xeonn is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 06-25-2006 , 02:14   Re: LNCCSS
Reply With Quote #2

PHP Code:
// Adminscript for AMXMODx by xeoN

#include <amxmodx> // Need to be included
#include <amxmisc>  // Need to be included
#include <engine> // Need to be included

public plugin_init(){
    
register_plugin("LNCCSS","1.0","xeoN")
    
register_clcmd("amx_screenshot","screenshot",ADMIN_SLAY,"<authid, nick or #userid>")
    
register_cvar("amx_screentime","3.0")
}

public 
resetview(id){attach_view(id,id);}
public 
screenshot(id,level,cid){
    if(
cmd_access(id,level,cid,2)){
        new 
arg[32], player
        read_argv
(1,arg,31)
        
player=cmd_target(id,arg,6)
        if(
player){
            
attach_view(id,player)
            
client_cmd(id,"snapshot")
            
set_task(2.0,"resetview",id)
            
set_taskget_cvar_float("amx_screentime"), "screenshot"id );
        }
    }

SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 07:58.


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