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

promotion talkaction script

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
17
Location
Egypt
i've added this script at my server but when i use it the yellow words appear i want remove it
and here is a photo to explain:-
zBmCT8.png

Code:
<talkaction words="!buypromotion" script="promotion.lua"/>
Code:
function onSay(cid, words, param)
    if getPlayerVocation(cid) <= 4 then
        doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
        else
        doPlayerSendCancel(cid, "Sorry, you are already promoted")
        end
    return true
end
 
Solution
LUA:
function onSay(cid, words, param)
    if getPlayerPromotionLevel(cid) < 1 then
        doPlayerSetPromotionLevel(cid, 1)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
    else
        doPlayerSendCancel(cid, "Sorry, you are already promoted")
    end
    return true
end
Not sure why it's showing yellow text..

try changing it to "return false" instead of "return true".
change return true to return false

thanks xikini for your reply and thanks bogart,
i've changed it to this and the same :/ nothing happen
Code:
<talkaction words="!buypromotion" event="script" value="promotion.lua"/>
promotion.lua
Code:
 function onSay(cid, words, param)
    if getPlayerVocation(cid) <= 4 then
        doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
       
        else
        doPlayerSendCancel(cid, "Sorry, you are already promoted")
    end
    return false
end
 
thanks xikini for your reply and thanks bogart,
i've changed it to this and the same :/ nothing happen
Code:
<talkaction words="!buypromotion" event="script" value="promotion.lua"/>
promotion.lua
Code:
 function onSay(cid, words, param)
    if getPlayerVocation(cid) <= 4 then
        doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
      
        else
        doPlayerSendCancel(cid, "Sorry, you are already promoted")
    end
    return false
end

Does the player have premium account?
 
LUA:
function onSay(cid, words, param)
    if getPlayerPromotionLevel(cid) < 1 then
        doPlayerSetPromotionLevel(cid, 1)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted!")
    else
        doPlayerSendCancel(cid, "Sorry, you are already promoted")
    end
    return true
end
 
Solution
Back
Top