FlyingSpoon Posted March 31, 2015 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 : ? GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Addlibs Posted March 31, 2015 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 ) Previously known as MrTasty.
FlyingSpoon Posted March 31, 2015 Author Posted March 31, 2015 Thanks, the prefix - Do I have to change "You gamemode name | " to e.g. "MyGamemode" GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
lonew000lf Posted March 31, 2015 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 --
GTX Posted April 1, 2015 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. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
JR10 Posted April 1, 2015 Posted April 1, 2015 Are you talking about game type (setGameType) or the gamemode itself (the resource)? Why would you want that anyway? Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
lonew000lf Posted April 1, 2015 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]
JR10 Posted April 1, 2015 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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