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

look system [shift-right click]

Calon

Experienced Member
Joined
Feb 6, 2009
Messages
1,070
Reaction score
21
i cant look for any items in my ot how i can solve this it was working before i re open ot
rep ++ thanks
 
here is my scrip dude
Code:
local cost = 10000
function onSay(cid, words, param, channel)
   if getPlayerMoney(cid) < cost then
       doPlayerSendCancel(cid,"You dont have enogh money.")
   end
   if getPlayerPromotionLevel(cid) == 1 then
        doPlayerSendCancel(cid,"You are already promoted")
   end
       setPlayerPromotionLevel(cid,1)
       doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
       doSendMagicEffect(getThingPos(cid),49)
	   doPlayerRemoveMoney(cid,cost)
   return true
end
line 13

hey sonical it is just a question, can you see an error in my script as i rlly cant find one, i think all ends are there right? :(

Shouldn't it be like this, as far as I know every "check if" in talkaction should have return true, at least all my scripts are made by that way, correct if I'm wrong.
LUA:
local cost = 10000
function onSay(cid, words, param, channel)
   if getPlayerMoney(cid) < cost then
       doPlayerSendCancel(cid,"You dont have enogh money.")
	   return true
   end
   if getPlayerPromotionLevel(cid) == 1 then
        doPlayerSendCancel(cid,"You are already promoted")
		return true
   end
       setPlayerPromotionLevel(cid,1)
       doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
       doSendMagicEffect(getThingPos(cid),49)
	   doPlayerRemoveMoney(cid,cost)
   return true
end
 
Shouldn't it be like this, as far as I know every "check if" in talkaction should have return true, at least all my scripts are made by that way, correct if I'm wrong.
LUA:
local cost = 10000
function onSay(cid, words, param, channel)
   if getPlayerMoney(cid) < cost then
       doPlayerSendCancel(cid,"You dont have enogh money.")
	   return true
   end
   if getPlayerPromotionLevel(cid) == 1 then
        doPlayerSendCancel(cid,"You are already promoted")
		return true
   end
       setPlayerPromotionLevel(cid,1)
       doSendAnimatedText(getThingPos(cid),"Promoted!",TEXTCOLOR_GREEN)
       doSendMagicEffect(getThingPos(cid),49)
	   doPlayerRemoveMoney(cid,cost)
   return true
end
only at the place where it will excute the talkaction , not the place of sending cancel , as return true in talkaction make the words appear in console , false will appear as default talk
 
Back
Top