FlyingSpoon Posted March 31, 2015 Share Posted March 31, 2015 Well, I want to create a small gamemode but like DayZ ( Not zombies or DayZ ) Like when you change the gamemode name the gamemode stops working, any ideas how I can do this : ? Link to comment
Addlibs Posted March 31, 2015 Share Posted March 31, 2015 prefix = "Your gamemode name | " addEventHandler("onResourceStart", resourceRoot, function() if getResourceName(source):sub(1, #prefix) == prefix then else cancelEvent(true, "Incorrect name prefix - Expected '"..prefix.."', got '"..getResourceName(source):sub(1, #prefix).."'") end end ) Link to comment
FlyingSpoon Posted March 31, 2015 Author Share Posted March 31, 2015 Thanks, the prefix - Do I have to change "You gamemode name | " to e.g. "MyGamemode" Link to comment
lonew000lf Posted March 31, 2015 Share Posted March 31, 2015 --[[prefix = "Your gamemode name | " addEventHandler("onResourceStart", resourceRoot, function() if getResourceName(source):sub(1, #prefix) == prefix then else cancelEvent(true, "Incorrect name prefix - Expected '"..prefix.."', got '"..getResourceName(source):sub(1, #prefix).."'") end end )]]-- just mark the lines with -- Link to comment
GTX Posted April 1, 2015 Share Posted April 1, 2015 --[[prefix = "Your gamemode name | " addEventHandler("onResourceStart", resourceRoot, function() if getResourceName(source):sub(1, #prefix) == prefix then else cancelEvent(true, "Incorrect name prefix - Expected '"..prefix.."', got '"..getResourceName(source):sub(1, #prefix).."'") end end )]]-- just mark the lines with -- What??? Thanks, the prefix - Do I have to change "You gamemode name | " to e.g. "MyGamemode" Change it to your resource name. Link to comment
JR10 Posted April 1, 2015 Share Posted April 1, 2015 Are you talking about game type (setGameType) or the gamemode itself (the resource)? Why would you want that anyway? Link to comment
lonew000lf Posted April 1, 2015 Share Posted April 1, 2015 if u are using the DayZ gamemode replace what i said and then go in meta.xml and search for name=[Your GM name] Link to comment
JR10 Posted April 1, 2015 Share Posted April 1, 2015 if u are using the DayZ gamemode replace what i said and then go in meta.xml and search for name=[Your GM name] What you posted before makes no sense. And he's not using DayZ. 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