Fishy Posted January 2, 2015 Posted January 2, 2015 Okay, So I have a resource that I can't start in the admin panel, the name does not even appear in the panel so I can't find it. It's a welcome message. The file is located here C:\Program Files (x86)\MTA San Andreas 1.4\server\mods\deathmatch\resources It is called message C:\Program Files (x86)\MTA San Andreas 1.4\server\mods\deathmatch\resources\message It has two folders inside, one is a .xml and one is a .lua I am nameing them : message.lua and meta.xml Names: message.lua & meta.xml Here are the codes for them Note : I am making a script not gamemode Meta.xml file message.lua file: function greetPlayer ( ) local joinedPlayerName = getPlayerName ( source ) local serverName = getServerName( ) outputChatBox ( "Welcome " .. joinedPlayerName .. " to ".. serverName .."!" , source, 255, 255, 255 ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) Please help me!
Fishy Posted January 2, 2015 Author Posted January 2, 2015 Yes, I restarted admin panel from Console & refreshed the list.
Mizudori Posted January 2, 2015 Posted January 2, 2015 "some_name" author"Fishy" type="script" version"1.3.2" />
MTA Team botder Posted January 2, 2015 MTA Team Posted January 2, 2015 "some_name" author="Fishy" type="script" version="1.0.0" /> I corrected your meta.xml. @Fishy: Did you refresh your resources with /refresh (you can also write 'refresh' without the ' in the server console)
Fishy Posted January 2, 2015 Author Posted January 2, 2015 Okay, I fixed the problem. I now can find the resource and run it successfully, but it seems the code is broken. I took the code from wiki function greetPlayer ( ) local joinedPlayerName = getPlayerName ( source ) local serverName = getServerName( ) outputChatBox ( "Helllo " .. joinedPlayerName .. " Wekcome to ".. serverName .."!" , source, 255, 255, 255 ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) Btw, the problem was i named my meta "meta.xml" and you only have to name it "meta"
Et-win Posted January 2, 2015 Posted January 2, 2015 https://wiki.multitheftauto.com/wiki/Debugging Check debugscript 3
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