Author Topic: uMaps changemap plugin  (Read 5690 times)

0 Members and 1 Guest are viewing this topic.

Offline benbrooks

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
uMaps changemap plugin
« on: September 21, 2008, 12:26:52 PM »
I've always wanted to change the nextmap in uMaps manually, So I asked a friend today to get to work and this is what he came up with.
A standalone script that goes in /lua/autorun/server.



To change the nextmap, type this in the console. By default, only admins can change the nextmap.
Code: [Select]
umaps_changemap mapname


Quote
Nextmap: gm_wireconstruct_rc
Ben: nextmap

] umaps_changemap gm_botmap_v2

Nextmap: gm_botmap_v2
Ben: nextmap
« Last Edit: September 21, 2008, 01:18:14 PM by benbrooks »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: uMaps changemap plugin
« Reply #1 on: September 21, 2008, 05:09:41 PM »
Good work! I strongly urge you to verify that the map being passed in is a valid map, however. If you don't want to check the maps directory directly (which is what I'd recommend), you can use the ulx.maps table to verify.
Experiencing God's grace one day at a time.

Offline benbrooks

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: uMaps changemap plugin
« Reply #2 on: September 23, 2008, 11:26:03 AM »
Ah yes, I never thought of validation!

I'll see what my friend can come up with :P