• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Pop-up messange

Wipflash

Old School
Joined
Jul 27, 2010
Messages
1,101
Reaction score
87
Location
Sweden
Hello . i am requesting a script that send a msg to the new player when it comes online for the first time :>

i wan't the text color white!
 
Code:
function onLogin(cid)

 local storage = getPlayerStorageValue(cid, 1000)
 
 if storage == -1 then
 doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to XXXSERVER. Enjoy your stay!")
 setPlayerStorageValue(cid, 1000, 1)
 else
 playerpos = getPlayerPosition(cid)
 --doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)--
 --doSendAnimatedText(playerpos, "Welcome!", TEXTCOLOR_LIGHTBLUE)--
 doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!")
 end
return TRUE
end
 
firstvisit.lua
Code:
function onLogin(cid)

 local storage = getPlayerStorageValue(cid, 1000)
 
 if storage == -1 then
 doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to XXXSERVER. Enjoy your stay!")
 setPlayerStorageValue(cid, 1000, 1)
 else
 playerpos = getPlayerPosition(cid)
 --doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)--
 --doSendAnimatedText(playerpos, "Welcome!", TEXTCOLOR_LIGHTBLUE)--
 doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!")
 end
return TRUE
end

Creaturescript.xml
Code:
<event type="login" name="firstvisit" event="script" value="firstvisit.lua" />


here hope it works now :P
 
firstvisit.lua
Code:
function onLogin(cid)

 local storage = getPlayerStorageValue(cid, 1000)
 
 if storage == -1 then
 doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to XXXSERVER. Enjoy your stay!")
 setPlayerStorageValue(cid, 1000, 1)
 else
 playerpos = getPlayerPosition(cid)
 --doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)--
 --doSendAnimatedText(playerpos, "Welcome!", TEXTCOLOR_LIGHTBLUE)--
 doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!")
 end
return TRUE
end

Creaturescript.xml
Code:
<event type="login" name="firstvisit" event="script" value="firstvisit.lua" />


here hope it works now :P

ill try that :>
 
Back
Top