Jump to content

Welcome msg not from admin P console!


kalitonchik

Recommended Posts

Posted

[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)

-

-

Posted

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

Posted

Hello,

I have a few questions...

1. Why create a new group (acl)

2. Seconly why a new resource just put that little bit of coding in your gamemode or sidescript.

And try the code :arrowup:

Greetings,

CJGrove

Posted

Yea, the group is pointless, but i think he wants it as a resource as gamemodes may change while he still wants the welcome message, but then again,

I can't be sure cause I can't understand what he's saying =/

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...