AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   New round and restart. (https://forums.alliedmods.net/showthread.php?t=140257)

zirualas 10-10-2010 06:41

New round and restart.
 
I have a problem but i know how to solve it but I don't know how to restart game in first round.

reinert 10-10-2010 06:52

Re: New round and restart.
 
server_cmd("sv_restart 1")

zirualas 10-10-2010 07:00

Re: New round and restart.
 
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 ;]

SaM.ThE.MaN 10-10-2010 07:32

Re: New round and restart.
 
Can you explain your question .. cause i really did not understand anything

reinert 10-10-2010 07:33

Re: New round and restart.
 
hook round start.

register_event("HLTV", "newROUND", "a", "1=0", "2=0")

zirualas 10-10-2010 07:50

Re: New round and restart.
 
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"


:arrow:
PHP Code:

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

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



SaM.ThE.MaN 10-10-2010 08:20

Re: New round and restart.
 
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

zirualas 10-10-2010 08:35

Re: New round and restart.
 
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 ;\

SpeeDeeR 10-10-2010 08:40

Re: New round and restart.
 
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")



zirualas 10-10-2010 09:53

Re: New round and restart.
 
Ok I solved it by my self. Thx anyway


All times are GMT -4. The time now is 10:26.

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