• 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!

Lua Creature Script <-- need help to fix it <--- urgent

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,529
Solutions
1
Reaction score
85
Location
Portugal
Lua:
function onLogin(cid)
broadcastMessage (cid, HI)
	return TRUE
end

TFS: 0.3.4

with that script when some1 logs on the server crash's and i cant find the way to make it broadcast when a player log in.
But it will only broadcast the mensage for that player.Not to all the server.

can any1 help me?
IF YOU HELP ME I WILL REP++:wub:
 
Last edited:
Lua:
function onLogin(cid)
   local playerpos = getPlayerPosition(cid)
   doBroadcastMessage (cid, 'HI')
   return TRUE
end
 
@Darad.
FAIL.
Lua:
function onLogin(cid)
   doBroadcastMessage('HI')
   return TRUE
end
You do not need playerpos, and broadcast with (cid)? lol
 
Lua:
function onLogin(cid)
playerpos = getPlayerPosition(cid)
doSendAnimatedText(playerpos, "Hi!, And welcome!", TEXTCOLOR_ORANGE)
	return 1
end

rep or die
 
ehmm @Babalow
dont talk shit if you dont know what are you talking about... the function doBroadcastMessage works both ways, check globalevents/clean.lua and look how the function is workign by default..

He was talking about "doBroadcastMessage(message, type)" and doBroadcastMessage dont need cid param so shut up. :]
cofcofOWNEDcof
 
@up
1. my message wasnt for u ..
2. where did I say it wont work without type thing? I just ctrl+c ctrl+v doc file.
3. if u have nothing to say shut up..

5 lines reply to say.. doBroadcastMessage works without type.. nice.. and?
 
Lua:
function onLogin(cid)
player = getPlayerByName(cid)

if player == 1 then
doPlayerSendTextMessage(cid, 23, "Hi")
doBroadcastMessage("".. Player .. " Just Logged in.")
        return 1
end
 
^ why would they remove the 1/0 true/false conversion.. doesn't the lua libs automatically do that?... unless "getPlayerByName" can be something else than true/false in 0.3 ofc

any1 know?
 
Back
Top Bottom