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

[Talkactions] /addvip and /removevip.. [Scripter please].

tellytubbie

New Member
Joined
Aug 17, 2008
Messages
86
Reaction score
0
Okey, in my serv i have this 2 commands to add or remove vip to a player, but this scripts make an error when i try to remove/add a vip.
error3.png


Addvip.lua
Code:
function onSay(cid,words,param)

if getPlayerAccess(cid) > 3 and param ~= "" and getPlayerStorageValue(getPlayerByName(param), 13540) == -1 or getPlayerStorageValue(getPlayerByName(param), 13540) == 0 then

doPlayerSendTextMessage(getPlayerByName(param),20,'una Vip acaba de serte adicionada!')
setPlayerStorageValue(getPlayerByName(param), 13540, 1)
doPlayerSendTextMessage(cid,21,'Acabas de obtener una VIP!')
elseif getPlayerAccess(cid) < 3 then
doPlayerSendTextMessage(cid,25,"No puedes dar mas VIPS.")

elseif getPlayerStorageValue(getPlayerByName(param), 13540) ~= -1 then
doPlayerSendTextMessage(cid,25,"Este jugador tiene VIP.")
else
doPlayerSendTextMessage(cid,21,"Necesitas poner el nombre de quien tendrá la VIP.")

end
end

Removevip.lua
Code:
function onSay(cid,words,param)

temple = getPlayerMasterPos(getPlayerByName(param))

if getPlayerAccess(cid) > 3 and param ~= "" and getPlayerStorageValue(getPlayerByName(param), 13540) == 1 then

doPlayerSendTextMessage(getPlayerByName(param),25,'Acabas de perder la VIP!')
doPlayerSendTextMessage(cid,21,'Te acabo de quitar la VIP!')
setPlayerStorageValue(getPlayerByName(param), 13540, -1)
doTeleportThing(getPlayerByName(param),temple)

elseif getPlayerAccess(cid) < 3 then
doPlayerSendTextMessage(cid,25,"No puedes remover las VIPS.")

elseif getPlayerStorageValue(getPlayerByName(param), 13540) ~= 1 then
doPlayerSendTextMessage(cid,25,"Este jugador ya no tiene VIP.")
else
doPlayerSendTextMessage(cid,21,"Necesitas decir el nombre del jugador que ya no tendrá VIP.")

end
end

I dont know what i should do. Anyone can help me?
 
Well make sure that you didn't put a space between the " and the name when executing the command.

Also, even if you use a slash-command, the param will still need to be put within quotation marks, thus the command would be:


/addvip "PlayerName"

/removevip "PlayerName"
 
Hello!

Here's my script that I used on my server (in English):

[TalkAction] Make VIP member to a player

I recommend to put mine script instead of yours, because you don't have any function to check if the player (target) is online or if that player exists, and that's the reason because your console might show you the error ""luaGetPlayerStorageValue(). Player not found"".

Regards.
 
Last edited:
Back
Top