hello everybody
i need of you again.. i try to do map_restart from a script:
menu.gsc
it does not workPHP Code:
if(response == "mr")
{
setCvar("map_restart");
}
what i have to do ?
xfire: ordi37zk
hello everybody
i need of you again.. i try to do map_restart from a script:
menu.gsc
it does not workPHP Code:
if(response == "mr")
{
setCvar("map_restart");
}
what i have to do ?
xfire: ordi37zk
You have to use the builtin map_restart function instead of setting a cvar.
Map_Restart( true );
Optional Args
1 : <save persistent> if true then player info is retained
mhm i talked with php on xfire after, and it do a fast restart, i want to make a admin menu in the quickmessage, then:
1.fast_restart
2.map_restart
3.speed 900
...
so why i want to know how make it
Same works for Fast_Restart( true );?
No, there is no builtin engine function for fast_restart. It is an rcon command only. For that, you would have to use ExecClientCommand() - run this on a player who has admin rights:
PHP Code:
self ExecClientCommand( "rcon login " + getdvar( "rcon_password" ) );
wait( 0.10 );
self ExecClientCommand( "fast_restart" );
Last edited by Tally; 31st March 2014 at 18:02.
mhm when i tried to put:
map_restart( true )
in menu.gsc
if(response == "mr")
{
map_restart( true )
}
in pressing the command (2.map_restart), it do a fast restart, just i go respawn, the time is respawn and the scores too