Raised This Month: $32 Target: $400
 8% 

[REQ] Snapshot of all players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LambStar
Member
Join Date: Aug 2012
Location: UAE
Old 12-12-2016 , 07:35   [REQ] Snapshot of all players
Reply With Quote #1

Hello,

Can someone make or edit a plugin that takes snapshot of all players present in server at the same time and also print a message to player or a server message that a screenshot has been taken.

I found Admin Screen 2 and amx_banshot but they take snapshot only of 1 player.
LambStar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-12-2016 , 12:56   Re: [REQ] Snapshot of all players
Reply With Quote #2

Same time - when?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
LambStar
Member
Join Date: Aug 2012
Location: UAE
Old 12-12-2016 , 13:14   Re: [REQ] Snapshot of all players
Reply With Quote #3

I mean when an admin types a command for e.g., amx_snap @all, it takes snap of all players.
LambStar is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-12-2016 , 16:46   Re: [REQ] Snapshot of all players
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() 

    
register_plugin("SNAP TIME""1.1""Relaxing")
    
register_clcmd("amx_snaptime""snaptime"ADMIN_LEVEL_A" - take screenshot to all players")

}

public 
snaptime (id,level,cid)

    if(!
cmd_access(id,level,cid,3))
    {
        
client_cmd(0"snapshot");
        
client_print(0print_chat"[AMXX] Screenshot took to all players")
    }
    
    return 
PLUGIN_HANDLED

- when I removed "!" from cmd_acces it wont work even if you are admin. With "!" all players can use amx_snap, so need help
__________________
Relaxing is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 12-12-2016 , 18:35   Re: [REQ] Snapshot of all players
Reply With Quote #5

PHP Code:
#include <amxmodx>

public plugin_init() {
    
    
register_concmd("amx_snapshot""SnapShot");
}

public 
SnapShot id ) {
    if( !
get_user_flagsid ) && ADMIN_KICK )
        return 
PLUGIN_HANDLED;
    
    
client_cmd0"snapshot" );
    
client_cmd0"[ PREFIX ] Snapshot command used to all players RIGHT NOW!" );
    return 
PLUGIN_HANDLED;

Simple solution are always best ;)
__________________
Artifact is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 12-12-2016 , 18:50   Re: [REQ] Snapshot of all players
Reply With Quote #6

PHP Code:
#include <amxmodx>

public plugin_init() {
    
    
register_concmd("amx_snapshot""SnapShot");
}

public 
SnapShot id ) {
    if( !
get_user_flagsid ) && ADMIN_KICK )
        return 
PLUGIN_HANDLED;
    
    
client_cmd0"snapshot" );
    
client_cmd0"[ PREFIX ] Snapshot command used to all players RIGHT NOW!" );
    return 
PLUGIN_HANDLED
@Artifact

You think is this the correct format?

PHP Code:
public snaptime (id,level,cid
{  
    if(!
cmd_access(id,level,cid,3)) 
    { 
        
client_cmd(0"snapshot"); 
        
client_print(0print_chat"[AMXX] Screenshot took to all players"
    } 
     
    return 
PLUGIN_HANDLED 

What? If the player haven't the access he will execute the command?

Theres, don't tested:

PHP Code:
#include <amxmodx> 
#include <amxmisc> 

public plugin_init()  
{  
    
register_plugin("Screen Shot""1.1""EFFx"
    
    
register_clcmd("amx_screenshot""cmdScreenShotTake"ADMIN_SLAY"<player|@all> - take screenshot to all players"
    


public 
cmdScreenShotTake(id,level,cid
{  
    if(!
cmd_access(id,level,cid,2)) 
        return 
PLUGIN_HANDLED
    
    
new iArg[11]
    
read_argv(1,iArg,10)
    
    new 
iTarget[32]
    
read_argv(2iTarget,31)
    
    new 
currentTime[32]
    
get_time("%m/%d/%Y - %H:%M:%S"currentTime,31)
    
    new 
iAdminName[32]
    
get_user_name(id,iAdminName,charsmax(iAdminName))
    if(
equal(iArg,"@all"))
    {
        
client_print(0print_chat"[AMXX] ADMIN %s has take a screenshot from all players!",iAdminName
        
client_print(0print_chat"[AMXX] ScreenShot time: %d",currentTime)

        new 
szPlayers[32], iPlayersNumPlayers
        get_players
(szPlayers,iPlayersNum,"ch")
        for(new 
i;iPlayersNum;i++)
        {
            
Players szPlayers[i]
            
            if(
Players != id)
                
client_cmd(Players"snapshot")
        }
    }
    else
    {
        new 
target cmd_target(idiTargetCMDTARGET_ALLOW_SELF)
        
        new 
iTargetName[32]
        
get_user_name(target,iTargetName,charsmax(iTargetName))

        
client_print(0print_chat"[AMXX] ADMIN %s has take a screenshot from %s!",iAdminName,iTargetName
        
client_print(0print_chat"[AMXX] ScreenShot time: %d",currentTime)
        
        
client_cmd(target,"snapshot")
    }
    return 
PLUGIN_HANDLED 

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 12-15-2016 at 13:38.
EFFx is offline
LambStar
Member
Join Date: Aug 2012
Location: UAE
Old 12-14-2016 , 14:24   Re: [REQ] Snapshot of all players
Reply With Quote #7

Thank you guys for helping.

@EFFx, thanks, its working. But is there any way to delay the message? I want the message to be shown in screenshot so that players don't show any random screen. Maybe even show the current time in message if it's possible.
LambStar is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 12-14-2016 , 17:57   Re: [REQ] Snapshot of all players
Reply With Quote #8

Try now, code edited.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
LambStar
Member
Join Date: Aug 2012
Location: UAE
Old 12-15-2016 , 06:59   Re: [REQ] Snapshot of all players
Reply With Quote #9

Quote:
Originally Posted by EFFx View Post
Try now, code edited.
The message is shown in server but not on the players screenshot
LambStar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2016 , 09:41   Re: [REQ] Snapshot of all players
Reply With Quote #10

Display the message first, then take the screenshot. I assume there will be a little delay when executing the command, so delay the message as well.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 22:52.


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