Hello I have a problem with my script. It lacks the two functions. When we are on the bike to stretch out Pokemon impossible, when we summon we can not open a bicycle. And using the bicycles we can not log out: D
Please anyone seeking compensation for me this script
Thank you: *
Sorry for google translate: *
Please anyone seeking compensation for me this script
Thank you: *
Sorry for google translate: *
Code:
local bikeCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bikeCondition, {lookType = 741, lookHead = 0,
lookBody = 0, lookLegs = 0, lookFeet = 0})
local t = {
[7730] = {article='a' ,name='bike', text='Mount, bike!', dtext='Demount, bike!',
s=100, condition=bikeCondition},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
return doAddCondition(cid, r.condition)
elseif getPlayerStorageValue(cid, s) == 1 then
doSendMagicEffect(pos, 3)
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end