Jump to content

Welcome msg not from admin P console!


kalitonchik

Recommended Posts

[22:38:17] Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry.

[22:38:19] ERROR: Couldn't find script welcome.lua for resource welcome

[22:38:19] Loading of resource 'welcome' failed

I whont welcome msg not from my admin console but lua script

function onPlayerConnect()

local joinedPlayerName = getClientName ( source )

outputChatBox ( "Welcome " .. joinedPlayerName .. " your txt " , source, 255, 255, 255 )

end

addEventHandler("onPlayerJoin", getRootElement (), onPlayerConnect)

-

-

Link to comment

Err, no idea what you man, but try and do this

in the welcome folder create a file called

welcome.lua (The error said it couldn't find it, so this is probably the problem)

  
function onPlayerConnect() 
local joinedPlayerName = getClientName ( source ) 
outputChatBox ( "Welcome " .. joinedPlayerName .. " your txt " , source, 255, 255, 255 ) 
end 
addEventHandler("onPlayerJoin", getRootElement (), onPlayerConnect) 
  

and you save the meta as meta.xml

then it should work, i think you just didnt name the script welcome.lua

Btw, you should put it on the auto start resources at the bottom of mtaserver.conf or something, so it starts when the server is started

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...