User
Pass
2FA
 
 

Mici probleme - plugin auto restart

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials
Author Message3371
SeaGer

[Very Important Person]



Status: Offline
(since 13-11-2022 20:08)
Joined: 10 Jan 2009
Posts: 9642, Topics: 235
Location: Aiki Seishin

Reputation: 3379.5
Votes: 387

 
Post Posted: 24-05-2009, 19:29:48 | Translate post to: ... (Click for more languages)

am pluginul asta, normal era setat pe 20 secunde, l-am modificat la 30 dar mai sus nu se duce. tot la 30 secunde da restart. ma puteti ajuta?

ms anticipat.

auto_restart_vl

Code:

/* Plugin generated by AMXX-Studio */
/*
FAQ:
When Setting The Value For -> amx_auto_restart <-
Setting Value Like This amx_auto_restart "60.0" Is Correct
Setting Value Like This amx_auto_restart "60" Is Not Correct
Because The Cvar Value Is A Float
*/

#include <amxmodx>

#define PLUGIN "Auto Restart vl"
#define VERSION "1.1"
#define AUTHOR "vato loco [GE-S]"

#define TIMER_TASK        123456
#define RESTART_TASK      789123

new g_counter 

new g_autorestart
new g_autoenabled

new g_SyncGameStart
new g_SyncRestartTimer

new bool:g_bRoundStart

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_logevent("RoundStart", 2, "1=Round_Start")
   register_event("TextMsg","RestartTask","a","2&#Game_C")   
   
   register_dictionary("auto_restart_vl.txt")
   
   g_autoenabled = register_cvar("amx_autorr_enable","1")
   g_autorestart = register_cvar("amx_auto_restart","60.0")
   
   g_SyncGameStart = CreateHudSyncObj()
   g_SyncRestartTimer = CreateHudSyncObj()
}

public RoundStart()
{
   if(!get_pcvar_num(g_autoenabled))
      return PLUGIN_HANDLED
   
   if(g_bRoundStart)
   {
      set_hudmessage( 0, 255, 0, -1.0, 0.40, 1, 5.0, 8.0, 0.0, 0.0, -1)
      ShowSyncHudMsg( 0, g_SyncGameStart, "%L",LANG_PLAYER, "GAME_STARTED")
   }
   g_bRoundStart = false
   
   return PLUGIN_CONTINUE
}

public RestartTask()
{
   if(!get_pcvar_num(g_autoenabled))
      return PLUGIN_HANDLED
   
   set_task(1.0,"TimeCounter",TIMER_TASK,_,_,"a",get_pcvar_num(g_autorestart))
   set_task(get_pcvar_float(g_autorestart),"RestartRound",RESTART_TASK)
   
   return PLUGIN_CONTINUE
}

public TimeCounter()
{
   g_counter++
   
   new Float:iRestartTime = get_pcvar_float(g_autorestart) - g_counter
   new Float:fSec
   fSec = iRestartTime
   
   set_hudmessage( 0, 255, 255, -1.0, 0.25, 0, 0.0, 1.0, 0.0, 0.0, -1)
   ShowSyncHudMsg( 0, g_SyncRestartTimer, "%L",LANG_PLAYER, "AUTO_RESTART", fSec)
   
   if(g_counter == get_pcvar_num(g_autorestart))
   {
      g_bRoundStart = true
   }
}

public RestartRound()
{
   server_cmd("sv_restartround 1")
}


If my message was helpful, feel free to +rep me. Thanx

0 0
  
Back to top
View user's profile Send private message
Shocker

[Freakz owner]



Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986, Topics: 1350
Location: localhost

Reputation: 6485.6
Votes: 829

   
Post Posted: 24-05-2009, 19:48:18 | Translate post to: ... (Click for more languages)

Nu mai ai vreun alt plugin de restart? Daca il scoti pe asta, isi mai da restart?

FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0 0
  
Back to top
View user's profile Send private message
SeaGer

[Very Important Person]



Status: Offline
(since 13-11-2022 20:08)
Joined: 10 Jan 2009
Posts: 9642, Topics: 235
Location: Aiki Seishin

Reputation: 3379.5
Votes: 387

 
Post Posted: 24-05-2009, 20:03:22 | Translate post to: ... (Click for more languages)

am rezolvat - eram prea nap - am lasat sma-ul original, am pus cvarurile in amxx.cfg si a mers. l-am pus ca urlau toti sa dea un admin rr etc... e mai simplu asa -

If my message was helpful, feel free to +rep me. Thanx

0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Tutorials  


The time now is 27-04-2024, 13:43:34
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x