simple welcome script
 

simple welcome script

Started by hawaj, 07 July, 2021, 12:24:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hawaj

hi iam looking fore simple welcome msg on log in script for all users (reg , unreg , etc)
with couple welcome msgs
can any1 help me with that script ????

best regards

ATAG

#1
Like this?
-- px_simple-welcome.lua /ATAG
-- Send welcome messages randomly

tMessages = {
"This is the first welcome message for you, have a nice day.",
[[a multiline
message looks
like this
if you want :)]],
"this is an other one...",
"you can use only static text this way.",
"Don't forget the comma at the end of line",
"And don't use quotation mark in the message :)",
}

function UserConnected(tUser)
	--math.randomseed(os.time())
	local i = math.random(1,table.getn(tMessages))
	Core.SendToUser(tUser, "<"..SetMan.GetString(21).."> "..tMessages[i])
end
-- comment it to disable for reg users
Regconnected = UserConnected
-- comment it to disable for operators
OpConnected = UserConnected

SMF spam blocked by CleanTalk