![]() |
|
Help change gametype with current map - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Help change gametype with current map (/Thread-Help-change-gametype-with-current-map.html) |
change gametype with current map - raminr63 - 09-29-2012 Hi again ![]() 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 ?!! RE: change gametype with current map - DidUknowiPwn - 09-30-2012 sv_maprotation sd? Just do g_gametype sd and then map rotate. RE: change gametype with current map - raminr63 - 09-30-2012 (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 ?! RE: change gametype with current map - archit - 09-30-2012 GetDvar("mapname"); RE: change gametype with current map - raminr63 - 09-30-2012 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 ?!! RE: change gametype with current map - archit - 09-30-2012 Your code must be sucking hard send me the solution and I will see what I can do RE: change gametype with current map - raminr63 - 09-30-2012 ok i will send you thank you. |