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

TFS 1.X+ help with this script please

darknelson

Member
Joined
Jun 19, 2011
Messages
190
Solutions
1
Reaction score
15
hey bros, please could you help me with this script im trying to do, its supposed when uuse a lever if ure level up to 80 or 80 and have 100.000 of money it changes ur vocation to voc 9 please help me bro

Lua:
local player = Player(cid)
local cost = 100000
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if Player:removeMoney(cost) and player:getLevel() == 80 then
 doPlayerSetVocation(cid, 9)
      doPlayerSave(cid)
      player:sendCancelMessage("Promoted Bro.")
      else
      return false
   end
   end


tfs 1.2
 
Lua:
local player = Player(cid)
local cost = 100000
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getLevel() == 80 then
player:removeMoney(cost)
doPlayerSetVocation(cid, 9)
doPlayerSave(cid)
player:sendCancelMessage("Promoted Bro.")
else
return false
end
end
 
thanks i already maked it myself look this

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerVocation(cid) == 0 and getPlayerLevel(cid) > 80 and Player(cid):removeMoney(100000) then
        doPlayerSetVocation(cid, 9)
        doCreatureSay(cid, "Rookstar Has Born.", TALKTYPE_ORANGE_1)
         else
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need 10cc and level 80 to get promoted.")
    end
    return true
end
 
Back
Top