Post: Changing gametype
10-31-2015, 06:17 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); How do I change the gametype? I thought that setting the
    g_gametype
dvar would work but not quite. When I try to change Domination into a Free For All (and do a fast restart), the scoreboard says Free For All and the typical Domination heads up display elements like the progress bar from capping a flag are gone. However, it appears to still be Domination. Anyway, the code is as follows:

    changeGametype()
{
gametype = "dm";

setDvar("g_gametype", gametype);
setDvar("ui_gametype", gametype); // Probably for Zombies only
self iprintln("^2Gametype^7 changed");
}
Last edited by BullyWiiPlaza ; 10-31-2015 at 06:22 PM.
10-31-2015, 06:40 PM #2
Procyon
Gym leader
map_restart(true); ? if you're using map_restart(false);
10-31-2015, 07:03 PM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by Procyon View Post
map_restart(true); ? if you're using map_restart(false);

I'm using
    map_restart(false);
10-31-2015, 07:04 PM #4
Procyon
Gym leader
Originally posted by BullyWiiPlaza View Post
I'm using
    map_restart(false);

Try with the map_restart(true);
10-31-2015, 07:19 PM #5
-Numb
You talkin to me?
Originally posted by Procyon View Post
Try with the map_restart(true);


"true" keeps persistent data and "false" resets all data,
therefore I think false is better to use so it dont remember the data from the different gamemode
10-31-2015, 07:23 PM #6
-Numb
You talkin to me?
Originally posted by BullyWiiPlaza View Post
How do I change the gametype? I thought that setting the
    g_gametype
dvar would work but not quite. When I try to change Domination into a Free For All (and do a fast restart), the scoreboard says Free For All and the typical Domination heads up display elements like the progress bar from capping a flag are gone. However, it appears to still be Domination. Anyway, the code is as follows:

    changeGametype()
{
gametype = "dm";

setDvar("g_gametype", gametype);
setDvar("ui_gametype", gametype); // Probably for Zombies only
self iprintln("^2Gametype^7 changed");
}


After a google search I found this together with the setDvar's you used:
    setDvar("party_teambased", "1");

So if you are trying to change from ffa to a teambased gamemode I guess you need to add this aswell
11-01-2015, 10:18 AM #7
BullyWiiPlaza
Climbing up the ladder
Originally posted by Numb View Post
"true" keeps persistent data and "false" resets all data,
therefore I think false is better to use so it dont remember the data from the different gamemode

Right. Using true is bad since it's a fast restart and it doesn't reload the gamemode information at all (I tried it).
11-02-2015, 06:32 PM #8
xPlayer420
Bounty hunter
the one i use doesn't work it only changes the name :(
11-02-2015, 06:37 PM #9
Forget about it I deleted the post. I'm Stoopid Idk
11-02-2015, 06:45 PM #10
xPlayer420
Bounty hunter
    
CGT(gt)
{
setDvar("g_gametype", gt);
map_restart(false);
}


anybody see what im doing wrong i tried changing S&Awesome face to Free For All

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo