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

V.I.P System problem

gurden

i need support for my server, good scripter!
Joined
May 19, 2009
Messages
519
Reaction score
5
Location
Sweden
V.I.P Problem.

This is my Script.. I get an Error when i click the medel. Saying
Lua script error vip.lua:9 attempt to call global "doBroadcastMessage" <a nil value>. I need to put somethig in global.lua but what ? :o

-- 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)
doBroadcastMessage("CONGRATULATIONS " .. name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!")
setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
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
 
delete this line:

doBroadcastMessage("CONGRATULATIONS " .. name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!")

and it will work tho
 
Code:
doBroadcastMessage("CONGRATULATIONS " .. name .. "! Now you are VIP for 15 days! Now you can enter the VIP-area and use unique features!", 19)


PHP:
MESSAGE_STATUS_CONSOLE_RED = 18
MESSAGE_EVENT_ORANGE = 19
MESSAGE_STATUS_CONSOLE_ORANGE = 20
MESSAGE_STATUS_WARNING = 21
MESSAGE_EVENT_ADVANCE = 22
MESSAGE_EVENT_DEFAULT = 23
MESSAGE_STATUS_DEFAULT = 24
MESSAGE_INFO_DESCR = 25
MESSAGE_STATUS_SMALL = 26
MESSAGE_STATUS_CONSOLE_BLUE = 27
 
Back
Top