ItsMods

Full Version: change gametype with current map
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi again Big Grin

in first with what mycode for c# i can use in itsmods ?!

In mw3 when you want to change gametype we have to use map rotation and it also change the map but i want to change gametype with current map so i have this code :

Code:
if (strArray[0].Equals("!dosd"))
                {
                    ServerSay("[AdminPlug] ^7: ^5Gametype Changed To ^1S&D ^5(Search And Destroy)!", true);
                    dvar = GetDvar("mapname");
                    Thread.Sleep(500);
                    ServerCommand("sv_maprotation sd");
                    ServerCommand("map_rotate");
                    ServerCommand("map " + dvar);
                    return false;
                }

But the gametype also changed with other map in rotation ?!!
so how i can get current map ?!!
sv_maprotation sd? Just do g_gametype sd and then map rotate.
(09-30-2012, 00:29)DidUknowiPwn Wrote: [ -> ]sv_maprotation sd? Just do g_gametype sd and then map rotate.

No with "g_gametype" the gametype not changed correctly (gametype changed to sd but older gametype such as ffa options always effected on sd -- in otherwise just the gametype name changed not options)
so we have to use sv_maprotation.

but i need know how i can get current map name ?!
GetDvar("mapname");
Thank you archit
but as you see i also use GetDvar("mapname");
and when i change game type (from sd to ffa) --> !doffa only map changed in rotation and after do one rotaion again (!dodom) gametype change to ffa also i do one rotation again(!dogg) gametype changed to dom .... as you see all gametype was changed with previous rotation ?!!


i need to change gametype in current map !! are you have better code for that ?!

and my other quastion : How I Disable Map Rotation Threshold ?!!
Your code must be sucking hard send me the solution and I will see what I can do
ok i will send you thank you.