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

Automatic Restart - Prevent fast-connecters to get money


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:          Approver:   Johnny got his gun (102)
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 01-07-2005 , 07:06   Automatic Restart - Prevent fast-connecters to get money
Reply With Quote #1

This plugin simply does a auto-restart after a defined amount of time. The restart occurs AFTER game commencing (both teams got players first).

This is usefull to prevent fast-connectors get easy and fast money for the 2nd round. So nearly everyone will be forced to play the pistolround on public-servers.

Code:
#include <amxmodx> public restart_time()       set_task (get_cvar_float("amx_autorestart"),"restart_map",0)    public restart_map() {          set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)            show_hudmessage(0,"[AMXX] Automatic Round-Restart!")          set_cvar_float("sv_restart",2.0)          return PLUGIN_HANDLED    }    public plugin_init() {       register_plugin("Auto-Restart","1.00","ToT | V!PER")       register_event("TextMsg","restart_time","a","2&#Game_C")       register_cvar("amx_autorestart","20.0")    return PLUGIN_CONTINUE      }
Attached Files
File Type: sma Get Plugin or Get Source (amx_autorestart.sma - 12654 views - 1.3 KB)
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-07-2005 , 16:07  
Reply With Quote #2

When you start the plugin you have it restart in 20.0 seconds. After it restarts, you set the amount of time to 2.0 seconds. Why?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 01-08-2005 , 04:03  
Reply With Quote #3

Quote:
Originally Posted by XxAvalanchexX
When you start the plugin you have it restart in 20.0 seconds. After it restarts, you set the amount of time to 2.0 seconds. Why?
No. It checks for the event "game commencing", sets a timer for 20 seconds and executes a servercmd -> sv_restart 2 (restartround after 2 seconds)
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
onedamage
Senior Member
Join Date: Apr 2004
Location: Montreal Canada
Old 03-25-2005 , 20:18  
Reply With Quote #4

any way u can add a message saying or something saying 'the round will restart', up untill the round acutally does restart ?

hhhmm, i wonder if u still support this ......january.....little far off....
__________________
69.12.99.130 Quebec Public CS 1.6
64.15.128.218 Quebec Public CS:SOURCE
www.QuebecPublic.com
onedamage is offline
Send a message via ICQ to onedamage Send a message via MSN to onedamage
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 03-25-2005 , 22:06  
Reply With Quote #5

Quote:
Originally Posted by onedamage
any way u can add a message saying or something saying 'the round will restart', up untill the round acutally does restart ?

hhhmm, i wonder if u still support this ......january.....little far off....
show_hudmessage(0,"[AMXX] Automatic Round-Restart!")

Hm, there is a hud-message beeing displayed. What message should be needed else?
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
onedamage
Senior Member
Join Date: Apr 2004
Location: Montreal Canada
Old 03-25-2005 , 22:28  
Reply With Quote #6

my mistake, i must have not realized when i was playing.

if the case is that it appears just before restarting:

how can i have it last longer ?
such as, i'd like it to last the whole 20 seconds, is this possible ?
__________________
69.12.99.130 Quebec Public CS 1.6
64.15.128.218 Quebec Public CS:SOURCE
www.QuebecPublic.com
onedamage is offline
Send a message via ICQ to onedamage Send a message via MSN to onedamage
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-26-2005 , 00:02  
Reply With Quote #7

http://amxmodx.org/funcwiki.php?go=func&id=28
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
onedamage
Senior Member
Join Date: Apr 2004
Location: Montreal Canada
Old 03-26-2005 , 00:03  
Reply With Quote #8

hey nice, thx v3x, i'll look into it.
__________________
69.12.99.130 Quebec Public CS 1.6
64.15.128.218 Quebec Public CS:SOURCE
www.QuebecPublic.com
onedamage is offline
Send a message via ICQ to onedamage Send a message via MSN to onedamage
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 03-26-2005 , 06:18  
Reply With Quote #9

Well, i could implement a "timer" function, so it counts down to restart. But this would override other messages that would be displayed i think. So i´ve made my choice to simply display a message shortly before restart.
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
onedamage
Senior Member
Join Date: Apr 2004
Location: Montreal Canada
Old 03-26-2005 , 10:23  
Reply With Quote #10

i understand your point,

the problem i have is that people are just starting to realize that there is a round restart

since its only happens once per map, people dont catch onto it quick, thats
why for me a message from the beginning of the map till execution is important.

to many people whinning that they just killed got a 5 kill streak, but then the round restarted,

if there was a message on their screen during the first 20 seconds, then i can call them idiots
__________________
69.12.99.130 Quebec Public CS 1.6
64.15.128.218 Quebec Public CS:SOURCE
www.QuebecPublic.com
onedamage is offline
Send a message via ICQ to onedamage Send a message via MSN to onedamage
Reply


Thread Tools
Display Modes

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 05:29.


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