Is it currently possible to have a mod that can auto set different speed and even jumpheight, to a different map?
it doesn't have to be for every map, but outpost, and mission come to mind.
You mean for each map there's a set jumpheight/speed?
(07-02-2012, 05:04)litgar Wrote: [ -> ]Yes it is possible
anyone who is capable willing to do it please?
cough*
just add an if/else check to onmapchanged()
that sets the settings in the Speed plugin
example:
CSHARP Code
public override void OnMapChange()
{
currmap = GetDvar("mapname");
if (currmap == "mp_radar")
{
g_speed_var = 190;
jump_height_var = 39;
fall_damage_var = 1;
gravity_var = 800;
infammo_var = 1;
} else if (currmap == "mp_village")
{
g_speed_var = 220;
jump_height_var = 79;
fall_damage_var = 1;
gravity_var = 600;
infammo_var = 1;
} else if (currmap == "mp_seatown")
{
g_speed_var = 190;
jump_height_var = 39;
fall_damage_var = 1;
gravity_var = 800;
infammo_var = 1;
} else if (currmap == "mp_bravo")
{
g_speed_var = 190;
jump_height_var = 39;
fall_damage_var = 1;
gravity_var = 800;
infammo_var = 1;
} else // if map not defined
{
g_speed_var = 190;
jump_height_var = 39;
fall_damage_var = 1;
gravity_var = 800;
infammo_var = 1;
}
}
it really isnt that hard (oh ignore the infammo setting lol)
thanks i'll try now
hmm keep getting currmap does not exist in the current content?
(07-02-2012, 11:36)zxz0O0 Wrote: [ -> ]Change
CSHARP Code
currmap = GetDvar("mapname");
to
CSHARP Code
string currmap = GetDvar("mapname");
that sorted out the error, but it's still defaulting to the jumpheight, speed that is set in the speedplugin, which is this..
g_speed_var = Convert.ToInt32(GetServerCFG("SPEEDPLUGIN", "Speed", "220"));
jump_height_var = Convert.ToInt32(GetServerCFG("SPEEDPLUGIN", "JumpHeight", "240"));
fall_damage_var = Convert.ToInt32(GetServerCFG("SPEEDPLUGIN", "FallDamage", "0"));
gravity_var = Convert.ToInt32(GetServerCFG("SPEEDPLUGIN", "Gravity", "800"));