AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Snapshot of all players (https://forums.alliedmods.net/showthread.php?t=291490)

LambStar 12-12-2016 07:35

[REQ] Snapshot of all players
 
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.

OciXCrom 12-12-2016 12:56

Re: [REQ] Snapshot of all players
 
Same time - when?

LambStar 12-12-2016 13:14

Re: [REQ] Snapshot of all players
 
I mean when an admin types a command for e.g., amx_snap @all, it takes snap of all players.

Relaxing 12-12-2016 16:46

Re: [REQ] Snapshot of all players
 
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 :P

Artifact 12-12-2016 18:35

Re: [REQ] Snapshot of all players
 
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 ;)

EFFx 12-12-2016 18:50

Re: [REQ] Snapshot of all players
 
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 



LambStar 12-14-2016 14:24

Re: [REQ] Snapshot of all players
 
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.

EFFx 12-14-2016 17:57

Re: [REQ] Snapshot of all players
 
Try now, code edited.

LambStar 12-15-2016 06:59

Re: [REQ] Snapshot of all players
 
Quote:

Originally Posted by EFFx (Post 2477866)
Try now, code edited.

The message is shown in server but not on the players screenshot

OciXCrom 12-15-2016 09:41

Re: [REQ] Snapshot of all players
 
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.


All times are GMT -4. The time now is 06:35.

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