AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Round Restart v2.2 (https://forums.alliedmods.net/showthread.php?t=89389)

dorin2oo7 04-05-2009 18:39

Round Restart v2.2
 
3 Attachment(s)
Round Restart v2.2
by Teascu Dorin


[IMG]http://img237.**************/img237/8720/descriptionz.png[/IMG]

Restarting map by say and/or say_team commands.
Auto restart map after specified amount of time by restart_auto_timeout cvar.
Displaying chat texts in colors (can be changed from *.txt).
Possibility of choosing 2 type of sounds upon restarting:
  • vox sound (valve words) - loading environment on to your computer
  • with sound precache - feelgood.wav (location -> cstrike/sound/misc)
Access for admins - ADMIN_KICK (can be change from *.sma)
Code:

#define ACCESS ADMIN_KICK
[IMG]http://img690.**************/img690/6929/settings.png[/IMG]

.:: Installing ::.
  1. Extract feelgood.wav.zip archive content into your server cstrike directory
  2. Copy say_restart.amxx into mod_dir/addons/amxmodx/plugins (mod_dir = cstrike, czero, dod etc)
  3. Copy round_restart.txt goes to mod_dir/addons/amxmodx/data/lang
  4. Open plugins.ini from mod_dir/addons/amxmodx/configs
  5. Add at the end of the list on a new line like follows:
    Code:

    say_restart.amxx
  6. Save and close plugins.ini
  7. Restart Server or Change Map


.:: Available Commands ::.

/rr, /live or /rrlive can be used in chat to restart current map played !


.:: Available CVAR`s ::.
  • restart_waittime "20.0"
    • Time between two restarts - in seconds (Def: 20.0)
  • restart_auto_timeout "30.0"
    • Time before auto restart occurs in seconds (Def.: 30.0)
  • restart_sound "1"
    • 0- Disabled | 1- Speak vox words/sounds | 2- play feelgood.wav sound (Def.: 1)
  • restart_auto_on "1"
    • 0- Disabled | 1- Enabled autoround restart (Def.: 1 - ON)
  • restart_countdown "1" *NEW*
    • 0- Disabled | 1- Enabled restart VOX countdown (Def.: 1 - ON)


[IMG]http://img694.**************/img694/5438/notes.png[/IMG]

You can change/modify chat message colors in the language *.txt file located in addons/amxmodx/data/lang named round_restart.txt !
Message colors usage:
- !y - Yellow (Normal chat color)
- !t - Team Color (Red=T, Blue=CT, Grey=Spec)
- !g - Green


[IMG]http://img690.**************/img690/4107/snapshots.png[/IMG]

This will appear in chat:
[IMG]http://img519.**************/img519/2279/restart.jpg[/IMG]


[IMG]http://img694.**************/img694/4868/mlang.png[/IMG]

Code:

[en] English - Teascu Dorin
[ro] Romanian - Teascu Dorin
[bg] Bulgarian - independent
[es] Spanish - alan_el_more
[de] German - Nextra
[fr] French - PsYChOPaTiQuE
[sv] Swedish - D-TOX
[nl] Dutch - crazyeffect
[tr] Turkish - TowerTurk [ C * ]
[bp] Brazilian-Portuguese - Warden
[pl] Polish - denis13wroc fixed by Bagieta
[sr] Serbian - Goran994

Any translations are useful !!!


[IMG]http://img691.**************/img691/5334/creditsk.png[/IMG]

Antibots and Alka for color chat printing
Alka for ideea and first plugin of this type
vato loco [GE-S] for using his plugin to add autorestart like nisam_ja asked here (and from v2.2 the countdown)


[IMG]http://img694.**************/img694/1227/change.png[/IMG]

Code:

26.Oct.2010 - v2.2 - [ADDED] voice countdown from 10 seconds upon autorestart (CVAR controled)
21.Sep.2009 - v2.1 - [FIXED] problem with access to command. Player had access to restart the map
20.Sep.2009 - v2.0 - [REMOVED] admin command /restart as beeing used within other plugin
15.Aug.2009 - v1.9 - [ADDED] autorestart function
            [ADDED] two more cvars to control auto restart
19.Jun.2009 - v1.8 - [ADDED] cvar restart_sound to choose between the 2 types of sounds
14.Apr.2009 - v1.7 - [ADDED] cvar restart_version
            [RMOVED] cvar_enabled as being unuseful
10.Apr.2009 - v1.6 - [ADDED] one more line in multilingual about waittime chat message
10.Apr.2009 - v1.5 - [CHANGED] part of the script for better performance
09.Apr.2009 - v1.4 - [CHANGED] cache mapname global
09.Apr.2009 - v1.3 - [ADDED] cvar --restart_enabled (enable/disable plugin ingame)
            [ADDED] restart_waittime (seconds between two restarts
            [ADDED] message about overusage of retart_waittime
            [CHANGED] time caching from engine module to get_gametime() from core
            [REMOVED] engine module
06.Apr.2009 - v1.2 - [CHANGED] to get_cvar_pointer to use get_pcvar_string about hostname
06.Apr.2009 - v1.1 - [ADDED] multilingual
            [CHANGED] get_users_flags with cmd_access for better performance
05.Apr.2009 - v1.0 - Initial release

.:: Game Monitor ::.

Server that using this plugin


[IMG]http://img690.**************/img690/3448/downloade.png[/IMG]

Nextra 04-05-2009 18:45

Re: Round Restart v1.0
 
Mh, I think thats a little bit of overkill for a simple sv_restart but anyway, here are some things you could/should change:

- Use get_cvar_pointer to use get_pcvar_string on hostname.
- Cache the mapname at startup, won't change.
- Statics for print function could be a good idea.
- Multilang

dorin2oo7 04-05-2009 18:50

Re: Round Restart v1.0
 
Quote:

Originally Posted by Nextra (Post 798358)
Statics for print function could be a good idea.

Can you explain this please? THX

fysiks 04-05-2009 19:04

Re: Round Restart v1.0
 
Quote:

Originally Posted by dorin2oo7 (Post 798363)
Can you explain this please? THX

http://wiki.amxmodx.org/Category:Scripting_(AMX_Mod_X) -> Optimizing Plugins

People will start coming down on you hard if you ask questions that can be simply answered by reading articles in that link above. Just an FYI.

PHP Code:

public say_restart(id
{
    if(!(
get_user_flags(id) & ACCESS))
        return 

:arrow:

PHP Code:

public say_restart(id,level,cid
{
    if(!
cmd_access(id,level,cid2))
        return 


dorin2oo7 04-06-2009 00:53

Re: Round Restart v1.0
 
THX for that. I don't know how to script... I am learning or at least try to... There is no one near me to teach me how to script.
I am trying to understand from all of you.
I know the possibility of not approving any of my plugins if I can't add or change anything, but I try my best to make it as best as possible.

dorin2oo7 04-06-2009 03:17

Re: Round Restart v1.2
 
EDIT (View Changelog) New features added !

independent 04-06-2009 03:21

Re: Round Restart v1.2
 
[bg]
RR_MSG = !y[AMXX] Dobre doshul v !t%s!
RR_MSG2 = !y[AMXX] Zarejda sreda za karta !t%s!
RR_MSG3 = !y[AMXX] Podgotvq otborite za igra!
RR_MSG4 = !y[AMXX] ...:: !gGL & HF ! !y ::...)

GJ

tuty 04-06-2009 07:30

Re: Round Restart v1.2
 
hey dorin, you should try this before making a new plugin :arrow: http://forums.alliedmods.net/showthread.php?t=85274

and remove the amxx file

alan_el_more 04-06-2009 07:49

Re: Round Restart v1.2
 
Prepairing

:arrow:

Preparing


Spanish traslate
[es]
RR_MSG = !y[AMXX] Bienvenido a !t%s !
RR_MSG2 = !y[AMXX] Cargando medio ambiente para el mapa !t%s !
RR_MSG3 = !y[AMXX] Preparando los equipos para jugar !
RR_MSG4 = !y[AMXX] ...:: !gGL & HF ! !y ::...

anakin_cstrike 04-06-2009 08:33

Re: Round Restart v1.2
 
Original plugin made by Alka, no credits though. click


All times are GMT -4. The time now is 17:23.

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