Jump to content

[REL] Bonsai's Multigamemode


Bonsai

Recommended Posts

  • 2 weeks later...

I've been toying around with this gamemode for a bit and I noticed that loading race maps with custom 3D elements doesn't seem to work properly, at first my system completely froze and crashed upon loading a racing map, at second time I got back into the server everything, seemed to load well, apart from said custom 3D models.

Does your gamemode support this type of maps by nature or is there something I must add / correct for it to function as intended?

Link to comment
Thats indeed a bug. :(

Somewhere in this topic was a solution how to fix that.

Bonsai

I asume you are talking about this

By the way!

About this lag/crash whatever thing.

It wasn't related to timers.

I just checked and it is related to replacing dff models.

Either fix it yourself by adding a "_", or wait until I maybe upload a fixed version. :P

If so, where is the underscore suppose to go exactly? i can't really make much sense of it by reading previous posts. The custom model files? (i.e: _example1.dff or example2_.dff).

EDIT: Ok so based on what I could gather from the previous posts, I changed the following lines on the wrapper_c.lua:

engineLoadDFF = function(path, model) 
  
    local dff = _engineLoadDFF(mapname.."/"..path, model) --  added a "_"  -- 
    table.insert(wrapper.models, model) 
    return dff 
     
end 

--Timers 
_setTimer = function(...) -- Added a "_"  -- 
     
    timer = _setTimer(...) 
    table.insert(wrapper.timers, timer) 
    return timer 
  
 end 

The problem still persists regarding the custom 3D models pertaining to racing maps, they just refuse to load, even though everything works fine for DM, DD (Cross) and Shooter maps. I'd really appreciate a little bit more support on this if possible.

749e9925192ccf333759ddd6277eed53afac2f001921bee6a2f3a53d3682fc6b.jpg

Link to comment
That whole wrapper thing is made pretty badly.

By now I would do it much different.

Replace the whole file with this:

http://pastebin.com/kS6AArzZ

I'm not sure if it works, but it should make a difference.

Bonsai

Yeah it did make a difference, the models load in fine with no lag or crashes this time around, however, it seems that the collisions are not being loaded, car falls right through the object once it's 'released' upon race start.

Link to comment
  • 3 weeks later...

The script is great , and im verry thankful for sharing it with everyone, but if u plan to update it in the future or whatsoever , i want to point few things out :P

-------------------------------------------------------------------------------------------------------

· The nametag , if the player name is small , the hp bar is also rly small

· When you login , example , my password start with "x" , it opens the Group chat in the sametime and writes the pass there

(someone may on accident send it to mainchat , etc)

· When you select a map in the vote , you change the chat (local/global/all

· You cannot create group for the chat

· You cannot PM to users

· F2 (Car hide) hides the car (in modern) , but the nametag stays (and the healthbar is bugged while carhide is on)

The healthbar is biiiiiig mby more than half of the screen

· Map weather/time are not loading

-------------------------------------------------------------------------------------------------------

One more thing , ive added a userpanel that ive used in "race server", but it seems that it doesnt get map win or etc , can someone help me to make it work for the modern/cross arena ?

Thats all :)

Link to comment
  • 4 weeks later...
  • 3 weeks later...
Hey, i got some quick question...at map loading i sawed that the map loader, doesnt load compiled scripts...like y tried to load [DM] Flo v6 (has a compiled script) and doesnt load it...why?

That's mta problem. Try it with race gamemode. It will not work.

Link to comment
Hey, i got some quick question...at map loading i sawed that the map loader, doesnt load compiled scripts...like y tried to load [DM] Flo v6 (has a compiled script) and doesnt load it...why?

That's mta problem. Try it with race gamemode. It will not work.

Well i tried at normal race, and it load's them, but at bonsai's gamemode doesn't work.

Link to comment
Hey, i got some quick question...at map loading i sawed that the map loader, doesnt load compiled scripts...like y tried to load [DM] Flo v6 (has a compiled script) and doesnt load it...why?

That's mta problem. Try it with race gamemode. It will not work.

Well i tried at normal race, and it load's them, but at bonsai's gamemode doesn't work.

The default race resource doesn't have to take care about loading scripts at all.

Link to comment
  • 2 months later...
  • 5 months later...
  • 8 months later...

Sorry to bump this tread.. I'm editing this gamemode to put on my server but the wheater and time won't load. From what I've been reading here, this is a problem with the wrapper(?). Is there any workaround I can do to make the time and weather work? 

 

Link to comment

The weather and time is not loaded from maps meta file.

You can try to add this in the mapmanager files.

Server:

elseif metaXMLName == "settings" then

for i, node in pairs(xmlNodeGetChildren(m)) do

  MapTable.mapData.settings[xmlNodeGetAttribute(node, "name")] = xmlNodeGetAttribute(node, "value")

end

end

Client:

if mapTable.settings["#time"] then

  local hour = string.match(mapTable.settings["#time"], "%d+")

  mapTable.settings["#time"] = string.reverse(mapTable.settings["#time"])

  local minute = string.match(mapTable.settings["#time"], "%d+")

  if hour and minute then

    setTime(hour, minute)

  end

end

if mapTable.settings["#weather"] then

  local weather = string.match(mapTable.settings["#weather"], "%d+")

  if weather then

    setWeather(weather)

  end

end

 

  • Like 1
Link to comment
1 hour ago, Bonsai said:

The weather and time is not loaded from maps meta file.

You can try to add this in the mapmanager files.

Server:


elseif metaXMLName == "settings" then

for i, node in pairs(xmlNodeGetChildren(m)) do

  MapTable.mapData.settings[xmlNodeGetAttribute(node, "name")] = xmlNodeGetAttribute(node, "value")

end

end

Client:


if mapTable.settings["#time"] then

  local hour = string.match(mapTable.settings["#time"], "%d+")

  mapTable.settings["#time"] = string.reverse(mapTable.settings["#time"])

  local minute = string.match(mapTable.settings["#time"], "%d+")

  if hour and minute then

    setTime(hour, minute)

  end

end

if mapTable.settings["#weather"] then

  local weather = string.match(mapTable.settings["#weather"], "%d+")

  if weather then

    setWeather(weather)

  end

end

 

Ok, i'ill try that. Thanks for the fast awnser.

Link to comment

Ok, I think that i've added the code in the two scripts but when I enter in a arena nothing happens. (Console gives me a error: mapmanager_s.lua:44: attempt to index field 'mapData' a nil value). Idk if I made something wrong in server side script. 

Thanks.

Edited by uFloody
 
Link to comment
  • 3 months later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...