tellytubbie
New Member
- Joined
- Aug 17, 2008
- Messages
- 86
- Reaction score
- 0
Okey, this scripts worked perfectly for me on TFS 0.3 but now i'm using TFS 0.2 and it make an error.. Can anybody fix it and make it work on tfs 0.2?
ADDVIP
REMOVEVIP
Error in console
ADDVIP
Code:
function onSay(cid,words,param)
if getPlayerAccess(cid) > 3 and param ~= "" and getPlayerStorageValue(getPlayerName(param), 211292) == -1 or getPlayerStorageValue(getPlayerName(param), 211292) == 0 then
doPlayerSendTextMessage(getPlayerName(param),20,'Una VIP acaba de serte adicionada!')
setPlayerStorageValue(getPlayerName(param), 211292, 1)
doPlayerSendTextMessage(cid,21,'Acabas de dar una VIP!')
elseif getPlayerAccess(cid) < 3 then
doPlayerSendTextMessage(cid,25,"No puedes dar mas VIPS.")
elseif getPlayerStorageValue(getPlayerName(param), 211292) ~= -1 then
doPlayerSendTextMessage(cid,25,"Este jugador tiene VIP.")
else
doPlayerSendTextMessage(cid,21,"Necesitas poner el nombre de quien tendrá la VIP.")
end
return TRUE
end
REMOVEVIP
Code:
function onSay(cid,words,param)
temple = getPlayerMasterPos(getPlayerName(param))
if getPlayerAccess(cid) > 3 and param ~= "" and getPlayerStorageValue(getPlayerName(param), 211292) == 1 then
doPlayerSendTextMessage(getPlayerName(param),25,'Tu VIP Account se ha acabado!')
doPlayerSendTextMessage(cid,21,'Te acabo de quitar la VIP!')
setPlayerStorageValue(getPlayerName(param), 211292, -1)
doTeleportThing(getPlayerName(param),temple)
elseif getPlayerAccess(cid) < 3 then
doPlayerSendTextMessage(cid,25,"No puedes remover las VIPS.")
elseif getPlayerStorageValue(getPlayerName(param), 211292) ~= 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
return TRUE
end
Error in console
Code:
[03/05/2009 13:17:54] Lua Script Error: [TalkAction Interface]
[03/05/2009 13:17:54] data/talkactions/scripts/addvip.lua:onSay
[03/05/2009 13:17:54] luaGetPlayerStorageValue(). Player not found