luddeax
New Member
- Joined
- Jun 14, 2009
- Messages
- 115
- Reaction score
- 0
I got this errors by using the vip medal! Please fixx them for me
PHP:function onUse(cid, item, fromPosition, itemEx, toPosition) local name = getCreatureName(cid) -- if getPlayerStorageValue(cid,11551) < 1 then if getPlayerLevel(cid) > 1 then getPlayerStorageValue(cid, 11551) doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 25 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1) doBroadcastMessage("CONGRATULATIONS " .. name .. "! Now you are VIP for 25 days! Now you can enter the VIP-area and use unique features!") setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 25)) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid,"You need to be at least level 2 to use this.") doRemoveItem(item.uid, 1) end -- else -- doPlayerSendCancel(cid,"You are already a donator.") -- end return TRUE end
:huh::huh::huh:
Well btw! Im using this medal and I get a message Welcome! And this long sentence Well only this is working -.- but hey if Im using the vip medal I cant go trough the door! -.-
Another bug: How can I make that the medal is not unlimited?
Im using it and hmmm ... its for ever -.-!
Please help me fast!
-Edit: Btw. Im using TFS 0.2.2 (MS)
I've fixed it
New vip.lua script for 0.2.2
PHP:
-- Credits StreamSide, Empty and Kaorus
function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getCreatureName(cid)
-- if getPlayerStorageValue(cid,11551) < 1 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
doPlayerRemoveItem(cid, 5785, 1)
else
doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
end
-- else
-- doPlayerSendCancel(cid,"You are already a donator.")
-- end
return TRUE
end