bandi94 Posted October 1, 2011 Share Posted October 1, 2011 i a make a next map shot system now i use the admin panel set next map funtion when you press the next map on admin panel it trigger the servermaps.lua on teh function is a check :if checkClient( true, source, 'setNextMap', mapName ) then return end this check if you are admin if not it debug admin security waring player whitout admin rights trigger admin panel functioln bla bal now i deleted the line and after this line is ExecuteCommandHandler("nextmap",mapname) now if i buy a map from my shop whit admin rights it set the next map if i don't have admin rights adn i buy a map no more Admin security warning but the map is not set for next now i think on command handler nextmap is again a right's check but i don't find where is the addCommandHandler("nextmap",..) now if somebody make a similar system or you know what is the problem or where is the addCommandHandler("nextmap",..) pls help me thx or how can i amke a setnext map function i tryed whit changeGamemodeMap() but it don't work i use gamemodes = call(getResourceFromName("mapmanager"), "getRunningGamemode") local maps = call(getResourceFromName("mapmanager"), "getMapsCompatibleWithGamemode",gamemodes ) and whit a for in pairs(maps) i get the map name and send it to client for a map name list and then when pres the buy buton it send to the server the map name again for in pairs() i get themap name and then if map name == whit map name from client then changeGamemodeMap(maps ) but i get bad argument changeGamemodeMap on argument 1 get nil Link to comment
BinSlayer1 Posted October 1, 2011 Share Posted October 1, 2011 \server\mods\deathmatch\resources\[gamemodes]\[race]\race\racevoting_server.lua line: 678 = 'nextmap' command you should use executeCommandHandler when a player buys a map, however lines 689 - 691 handle a check for admin rights. You need to find a way (maybe pass extra argument) to adjust it so that it skips this check if a map was bought by a player (i.e command was executed with executeCommandHandler) Link to comment
bandi94 Posted October 1, 2011 Author Share Posted October 1, 2011 thx man i tryed to pass an extra argument buy i faild easier way copy paste the set next map code line's changed the command name from nextmap to something else on buy system executeCommandHandler(the new one) and on the new one i deleted the check for admin line's and its working fine Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now