AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Custom Roundtime (https://forums.alliedmods.net/showthread.php?t=332616)

SoccerjamTR 05-22-2021 16:19

Custom Roundtime
 
I want to count seconds like a stopwatch and replace player's roundtime area. Examle,
Starting 1 minute, 1.00,1.01,1.02,1.03....1.59,1.00,1.01,1.02,1. 03.....1.59....
Seconds will start 1.00 and the seconds always must be loop after 1.59. Thanks.

Supremache 05-22-2021 19:03

Re: Custom Roundtime
 
Quote:

Originally Posted by SoccerjamTR (Post 2747528)
I want to count seconds like a stopwatch and replace player's roundtime area. Examle,
Starting 1 minute, 1.00,1.01,1.02,1.03....1.59,1.00,1.01,1.02,1. 03.....1.59....
Seconds will start 1.00 and the seconds always must be loop after 1.59. Thanks.

Code:
#include <amxmodx> #define PLUGIN "Countdown" #define VERSION "1.0" #define AUTHOR "Supremache" const TaskCountdown = 34234244; new g_iCountdown public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_logevent( "EventRoundStart" , 2 , "1=Round_Start" ) } public EventRoundStart() {         if ( !task_exists( TaskCountdown ) )         set_task( 1.0 , "Countdown" , TaskCountdown , .flags="a" , .repeat= ( g_iCountdown = 59 ) ) } public Countdown() {     set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);     show_hudmessage(0, "Secounds in %i", g_iCountdown-- ); }

SoccerjamTR 05-23-2021 08:03

Re: Custom Roundtime
 
Quote:

Originally Posted by Supremache (Post 2747542)
Code:
#include <amxmodx> #define PLUGIN "Countdown" #define VERSION "1.0" #define AUTHOR "Supremache" const TaskCountdown = 34234244; new g_iCountdown public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_logevent( "EventRoundStart" , 2 , "1=Round_Start" ) } public EventRoundStart() {         if ( !task_exists( TaskCountdown ) )         set_task( 1.0 , "Countdown" , TaskCountdown , .flags="a" , .repeat= ( g_iCountdown = 59 ) ) } public Countdown() {     set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);     show_hudmessage(0, "Secounds in %i", g_iCountdown-- ); }

Thanks but I don't want this. I want roundtime like this area ( follow arrow)

Supremache 05-23-2021 14:02

Re: Custom Roundtime
 
in same place or what ?
i dont understand what you want

SoccerjamTR 05-23-2021 14:34

Re: Custom Roundtime
 
I want to replace original round time to fake round time so you will change mp_roundtime area and add this area to stopwatch.
Example original if mp_roundtime = 2 , the clock start 2.00 and decrease to 1.00,... 0.00
I want fake round time and starting 1 minute, 1.00,1.01,1.02,1.03....1.59,1.00,1.01,1.02,1. 03.....1.59....
so i don't want hud message i want replace roundtime.

Supremache 05-23-2021 15:51

Re: Custom Roundtime
 
I don't know if it possible, if it possible then i dont have idea how to do this.

SoccerjamTR 05-23-2021 16:10

Re: Custom Roundtime
 
Quote:

Originally Posted by Supremache (Post 2747639)
I don't know if it possible, if it possible then i dont have idea how to do this.

sample available here
server ip: 94.142.235.239:27100

Celena Luna 05-23-2021 21:59

Re: Custom Roundtime
 
Quote:

Originally Posted by Supremache (Post 2747639)
I don't know if it possible, if it possible then i dont have idea how to do this.

It is possible by using MsgRoundTime
PHP Code:

#include <amxmodx>

#define PLUGIN    "Timeleft as Roundtime"
#define AUTHOR    "AcidoX (idea), Arkshine and joaquimandrade"
#define VERSION    "1.2"

new gMsgidShowTimer;
new 
g_RoundTime 0;

public 
plugin_init ()
{
    
register_pluginPLUGINVERSIONAUTHOR);
    
register_cvar"TimeleftRoundtime",VERSION,FCVAR_SERVER|FCVAR_SPONLY )
    
register_messageget_user_msgid"RoundTime" ),"Event_RoundTime" );
    
register_event"BombDrop""Event_BombDropped""a""4=1" );                        
    
gMsgidShowTimer get_user_msgid"ShowTimer" );
}

public 
Event_RoundTime( const MsgId, const MsgDest, const MsgEnt )
{
    if(
get_timeleft() != 0)
            
set_msg_arg_int1ARG_SHORTg_RoundTime += 1); //Just messing around this one if it didn't work
}

public 
Event_BombDropped ()
{
    
message_beginMSG_BROADCASTgMsgidShowTimer );
    
message_end();


Or you can use Dias "Infinity Module" to set it like in the picture you sent

SoccerjamTR 05-24-2021 14:01

Re: Custom Roundtime
 
Quote:

Originally Posted by Celena Luna (Post 2747659)
It is possible by using MsgRoundTime
PHP Code:

#include <amxmodx>

#define PLUGIN    "Timeleft as Roundtime"
#define AUTHOR    "AcidoX (idea), Arkshine and joaquimandrade"
#define VERSION    "1.2"

new gMsgidShowTimer;
new 
g_RoundTime 0;

public 
plugin_init ()
{
    
register_pluginPLUGINVERSIONAUTHOR);
    
register_cvar"TimeleftRoundtime",VERSION,FCVAR_SERVER|FCVAR_SPONLY )
    
register_messageget_user_msgid"RoundTime" ),"Event_RoundTime" );
    
register_event"BombDrop""Event_BombDropped""a""4=1" );                        
    
gMsgidShowTimer get_user_msgid"ShowTimer" );
}

public 
Event_RoundTime( const MsgId, const MsgDest, const MsgEnt )
{
    if(
get_timeleft() != 0)
            
set_msg_arg_int1ARG_SHORTg_RoundTime += 1); //Just messing around this one if it didn't work
}

public 
Event_BombDropped ()
{
    
message_beginMSG_BROADCASTgMsgidShowTimer );
    
message_end();


Or you can use Dias "Infinity Module" to set it like in the picture you sent

not working
Server mod soccerjam bomb?

Celena Luna 05-25-2021 22:33

Re: Custom Roundtime
 
Quote:

Originally Posted by SoccerjamTR (Post 2747715)
not working
Server mod soccerjam bomb?

I might need more testing first, I will post it later


All times are GMT -4. The time now is 19:52.

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