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

Problem in script

felipemko

New Member
Joined
Mar 2, 2010
Messages
173
Reaction score
3
Why this code don't remove [VIP]?

if (isVip(cid)) then
local name = getCreatureName(cid)
if not (string.find(tostring(name):lower(),"[[vip]]")) then
db.executeQuery("UPDATE `players` SET `name` = '[VIP] ".. getCreatureName(cid).. "' WHERE `id` = "..getPlayerGUID(cid)..";")
doRemoveCreature(cid)
end
else


if string.find(tostring(name):lower(),"[[vip]]") then
local newname = string.sub(tostring(name), 7)
db.executeQuery("UPDATE `players` SET `name` = '".. newname .."' WHERE `id` = "..getPlayerGUID(cid)..";")
doRemoveCreature(cid)
end
end
 
because what I understand from your script (upper part) is that if I am a VIP player then ill get kicked & my name will have a "[VIP]" before it?

Offtopic: this is a useless script, you can just use vip effects, would be better (if u cant script that PM me with your storage value for VIP :p)
 
Back
Top Bottom