Traxy Posted January 1, 2013 Share Posted January 1, 2013 Hey! i have figured out that i wona start creating a server and want to learn how to script! But my problems comes alredy at the werry beginning!... This is my code! ______________________________________________________________________________ addEventHandler("onPlayerJoin", getRootElement(), joinHandler)" /> ________________________________________________________________________________ and when i try to start the server with this code it pops up a ERROR mesg on the command prompt ERROR coulden`t parse meta file for resource "myserver" What dose this mean actualy? when i start up my "script" program i get a new Error mesg that says "missing attribute value attribute" on som of the sentense i got that i code But what dose this actualy means?.. what must i do to get this server up going? am onestly a noob on this thing so i hope some of you guys or girls coud help me out a litle! am REALY greatfoul for those who help me out! you thank you so mutch for helping me! and yeah one more thing.... HAPPY NEW YEAR! Link to comment
Castillo Posted January 1, 2013 Share Posted January 1, 2013 That's because you put it all on one file, it should be two separate files: meta.xml, and the script that we can call it: script.lua, so it would look like this: meta.xml: "YourName" type="gamemode" name="My Server" description="My first MTA server" /> script.lua: local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox(" Welcome to My Server ", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) Link to comment
Traxy Posted January 1, 2013 Author Share Posted January 1, 2013 oh Loooooool THANK you WERRY mutch!!!! i have been trying to figer this out my self for 7 houers or maby more .... i whas starting to get kinde a angry over this program thingy! but thank you werry mutch!!! Link to comment
xXMADEXx Posted January 2, 2013 Share Posted January 2, 2013 You should read the MTA wiki. 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