th3cross3r Posted September 1, 2011 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
Castillo Posted September 1, 2011 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
th3cross3r Posted September 1, 2011 Author Posted September 1, 2011 it dont saves.. on every server restart.. its standart
Castillo Posted September 1, 2011 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BinSlayer1 Posted September 1, 2011 Posted September 1, 2011 Uuh, don't you simply change the gamemode name in the meta.xml in the name=" " tag ?
JR10 Posted September 1, 2011 Posted September 1, 2011 He means, the game mode in the server browser. 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
th3cross3r Posted September 1, 2011 Author 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>
Castillo Posted September 1, 2011 Posted September 1, 2011 setGameType is a function, it doesn't go in meta.xml, you put that in a .lua script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
th3cross3r Posted September 1, 2011 Author 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
Castillo Posted September 1, 2011 Posted September 1, 2011 You welcome. 1 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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