• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Small script for an OT: Online and Offline !

Xapuur

New Member
Joined
Sep 15, 2009
Messages
157
Reaction score
0
Location
Chile
Hello. I was doing an script when a player connect, in his position appears the words "Online!". And i was doing other script that when he logout, in his position appears the words Offline !. I do this script for my last OT (2 years ago xd) and i don't rememer what i put. So i try, and i made this:

creaturescripts.xml
Code:
	<event type="login" name="OnlineEffect" script="online.lua"/>

Script:
Code:
function onLogin(cid)
	 doCreatureSay(cid, "Online !", TALKTYPE_ORANGE_1)
end

But.. there is a problem (always is a problem xd), the script don't works and in console don't appears nothing, then i can't know in what i am wrong.. Can you tell me?. Thanks !

Regards
 
Remove the xml part and just add
LUA:
doCreatureSay(cid, "Online !", TALKTYPE_ORANGE_1)
after
LUA:
if(not isPlayerGhost(cid)) then
in login.lua
 
Remove the xml part and just add
LUA:
doCreatureSay(cid, "Online !", TALKTYPE_ORANGE_1)
after
LUA:
if(not isPlayerGhost(cid)) then
in login.lua

I have this:
Code:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
[COLOR="#B22222"]	doCreatureSay(cid, "Online !", TALKTYPE_ORANGE_1)[/COLOR]
	return TRUE
end

It works, but it will not affect to players death, right?

Thanks !

And.. how i can do Offline ! ?
 
Back
Top