Raised This Month: $ Target: $400
 0% 

New round and restart.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 06:41   New round and restart.
Reply With Quote #1

I have a problem but i know how to solve it but I don't know how to restart game in first round.
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
reinert
Veteran Member
Join Date: Feb 2007
Old 10-10-2010 , 06:52   Re: New round and restart.
Reply With Quote #2

server_cmd("sv_restart 1")
reinert is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 07:00   Re: New round and restart.
Reply With Quote #3

Ok it's work, but one more question, how i can do that then round start's server restart. I know how to do only then spawn player.
Code:
PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Spawn,"player","runda"1);
}

public 
runda(id)
{
    
server_cmd("sv_restart 1"

This is my part of code ;]
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-10-2010 , 07:32   Re: New round and restart.
Reply With Quote #4

Can you explain your question .. cause i really did not understand anything
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-10-2010 , 07:33   Re: New round and restart.
Reply With Quote #5

hook round start.

register_event("HLTV", "newROUND", "a", "1=0", "2=0")
reinert is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 07:50   Re: New round and restart.
Reply With Quote #6

So I need change this code:
PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Spawn,"player","runda"1);
}

public 
runda(id)
{
    
server_cmd("sv_restart 1"


PHP Code:
public plugin_init()
{
register_event("HLTV""newROUND""a""1=0""2=0")     
}

public 
runda(id)
{
    
server_cmd("sv_restart 1"

__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-10-2010 , 08:20   Re: New round and restart.
Reply With Quote #7

OH ... so thats what you are doing ... Yes , because Ham_spawn , when you spawn it runs your script , but
register_event("HLTV", "newROUND", "a", "1=0", "2=0") it runs your script at the beginning of the round
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 08:35   Re: New round and restart.
Reply With Quote #8

Yes I want that then round start starts countdown ;p But i do than player spawn start countdown so i don't know how do it ;\
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 10-10-2010 , 08:40   Re: New round and restart.
Reply With Quote #9

PHP Code:
new i=0
//plugin_init()
//after freezetime
register_logevent("roundstart",2,"1=Round_Start")
//before freezetime
register_event("HLTV""roundstart""a""1=0""2=0")

public 
roundstart()
{
i++
if(
i=1)
server_cmd("sv_restart 1")

SpeeDeeR is offline
zirualas
Senior Member
Join Date: Jun 2010
Location: Lithuania
Old 10-10-2010 , 09:53   Re: New round and restart.
Reply With Quote #10

Ok I solved it by my self. Thx anyway
__________________
Still studying scripting...
zirualas is offline
Send a message via Skype™ to zirualas
Reply



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 10:26.


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