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

count on player

Kjhgfd

New Member
Joined
Dec 25, 2016
Messages
63
Reaction score
1
Code:
local name = getItemNameById(10824)

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == 9009 and (doPlayerRemoveMoney(cid, 5000) == TRUE) and getPlayerFreeCap(cid) >= 50 then   
doPlayerAddItem(cid, 10824, 20)
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have 20  ".. name .."s .")
else
doPlayerSendCancel(cid,"You don't have enought Money!")
end
return TRUE
end

need edite in this script to count to 60 on player 1.2..3.4.5.6.to 60 on player
 
Solution
Code:
local function doSendEffects(cid, c)
     local pos = getPlayerPosition(cid)
     doSendMagicEffect(pos, 14)
     doSendAnimatedText(pos,60-c, math.random(200))
     return true
end

local name = getItemNameById(10824)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == 9009 and (doPlayerRemoveMoney(cid, 5000) == TRUE) and getPlayerFreeCap(cid) >= 50 then 
doPlayerAddItem(cid, 10824, 20)
  for c = 0, 60 do
 addEvent(doSendEffects, c * 1000, cid, c)
    end
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have 20  ".. name .."s .")
else
doPlayerSendCancel(cid,"You don't have enought Money!")
end
return TRUE
end
Code:
local function doSendEffects(cid, c)
     local pos = getPlayerPosition(cid)
     doSendMagicEffect(pos, 14)
     doSendAnimatedText(pos,60-c, math.random(200))
     return true
end

local name = getItemNameById(10824)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == 9009 and (doPlayerRemoveMoney(cid, 5000) == TRUE) and getPlayerFreeCap(cid) >= 50 then 
doPlayerAddItem(cid, 10824, 20)
  for c = 0, 60 do
 addEvent(doSendEffects, c * 1000, cid, c)
    end
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have 20  ".. name .."s .")
else
doPlayerSendCancel(cid,"You don't have enought Money!")
end
return TRUE
end
 
Solution
Back
Top