th3cross3r Posted September 1, 2011 Share Posted September 1, 2011 Hello, when you are on the Server Browser and see my Server, you see the Gamemode... and the gamemode is by me: MTA:SA ... i wanna change it... where and how? pls help! greetings, th3cross3r Link to comment
Castillo Posted September 1, 2011 Share Posted September 1, 2011 You can change it from the admin panel by lil toady (default) in the "Server" tab, or via scripting using setGameType function. Link to comment
th3cross3r Posted September 1, 2011 Author Share Posted September 1, 2011 it dont saves.. on every server restart.. its standart Link to comment
Castillo Posted September 1, 2011 Share Posted September 1, 2011 That's right, but if you use setGameType in a script onResourceStart, it'll be set every time the resource starts. Link to comment
BinSlayer1 Posted September 1, 2011 Share Posted September 1, 2011 Uuh, don't you simply change the gamemode name in the meta.xml in the name=" " tag ? Link to comment
JR10 Posted September 1, 2011 Share Posted September 1, 2011 He means, the game mode in the server browser. Link to comment
th3cross3r Posted September 1, 2011 Author Share Posted September 1, 2011 it doesnt works! -.- <meta> <info gamemodes="play" type="map" name="GPG* - World" author="Th3Cross3r" version="0.1"></info> <map src="play-GPGworld.map" dimension="0"></map> setGameType="GPG World Beta v. 0.1" <map src="broph.map" /> <script src="broph.lua"/> </meta> Link to comment
Castillo Posted September 1, 2011 Share Posted September 1, 2011 setGameType is a function, it doesn't go in meta.xml, you put that in a .lua script. Link to comment
th3cross3r Posted September 1, 2011 Author Share Posted September 1, 2011 I edited the broph.lua data (Play) to this... addEventHandler("onResourceStart", resourceRoot, function() setGameType ("GPG World Beta v. 0.1") resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end repeat until spawnPlayer ( player, 2468+math.random(1,5), -1668+math.random(5,9), 13.4, 90, math.random(312), 0, 0) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end ) ..and it works fine!! Thank you 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