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

The best VIP system ever! [Action/Movevent/Globalevent]

<talkaction log="yes" words="/removedays" access="5" event="script" value="removedays.lua"/>
[05/12/2014 20:03:49] [Error - TalkAction Interface]
[05/12/2014 20:03:49] data/talkactions/scripts/removedays.lua:eek:nSay
[05/12/2014 20:03:49] Description:
[05/12/2014 20:03:49] data/talkactions/scripts/removedays.lua:32: attempt to concatenate field '?' (a nil value)
[05/12/2014 20:03:49] stack traceback:
[05/12/2014 20:03:50] data/talkactions/scripts/removedays.lua:32: in function <data/talkactions/scripts/removedays.lua:2>

<talkaction log="yes" words="/adddays" access="5" event="script" value="adddays.lua"/>
[05/12/2014 20:02:57] [Error - TalkAction Interface]
[05/12/2014 20:02:57] data/talkactions/scripts/adddays.lua:eek:nSay
[05/12/2014 20:02:57] Description:
[05/12/2014 20:02:57] data/talkactions/scripts/adddays.lua:32: attempt to concatenate field '?' (a nil value)
[05/12/2014 20:02:57] stack traceback:
[05/12/2014 20:02:57] data/talkactions/scripts/adddays.lua:32: in function <data/talkactions/scripts/adddays.lua:2>
 
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have added ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just added you ".. t[1] .." vip days.")
end
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have removed ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just removed you ".. t[1] .." vip days.")
end
 
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have added ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just added you ".. t[1] .." vip days.")
end
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have removed ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just removed you ".. t[1] .." vip days.")
end
changed it and still get this error and this is command /adddays 10, NAME
[28/12/2014 17:41:15] [Error - TalkAction Interface]
[28/12/2014 17:41:15] data/talkactions/scripts/adddays.lua:eek:nSay
[28/12/2014 17:41:15] Description:
[28/12/2014 17:41:15] data/talkactions/scripts/adddays.lua:34: attempt to concatenate global 'sender' (a nil value)
[28/12/2014 17:41:15] stack traceback:
[28/12/2014 17:41:16] data/talkactions/scripts/adddays.lua:34: in function <data/talkactions/scripts/adddays.lua:2>
this is the script
Code:
--- Script by Kekox.
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end

local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return true
end

local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end

if(t[1] > 365) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.")
return true
end

sender = getPlayerByNameWildcard(cid)

doAddVipDays(pid, t[1])
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have added ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just added you ".. t[1] .." vip days.")
end
return true
end
 
Code:
sender = getPlayerName(cid)
/adddays 10, name
but the player is online and he got the vip days

[29/12/2014 17:47:22] [Error - TalkAction Interface]
[29/12/2014 17:47:22] data/talkactions/scripts/adddays.lua:eek:nSay
[29/12/2014 17:47:22] Description:
[29/12/2014 17:47:22] (luaDoPlayerSendTextMessage) Player not found

[29/12/2014 17:47:22] [Error - TalkAction Interface]
[29/12/2014 17:47:22] data/talkactions/scripts/adddays.lua:eek:nSay
[29/12/2014 17:47:22] Description:
[29/12/2014 17:47:22] (luaDoPlayerSendTextMessage) Player not found

Code:
--- Script by Kekox.
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end

local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return true
end

local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end

if(t[1] > 365) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.")
return true
end

sender = getPlayerName(cid)

doAddVipDays(pid, t[1])
doPlayerSendTextMessage(cid, "You have added ".. t[1] .." vip days to ".. t[2])
doPlayerSendTextMessage(pid, sender .." just added you ".. t[1] .." vip days.")
return true
end
 
Add the message type MESSAGE_STATUS_CONSOLE_BLUE and if t[2] then
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have added ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just added you ".. t[1] .." vip days.")
end
Code:
if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have removed ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just removed you ".. t[1] .." vip days.")
end
 
Add the message type MESSAGE_STATUS_CONSOLE_BLUE and if t[2] then
mmm last thing i made it and there isn't any error on console and working fine on game but the player didn't get the days Oo
Code:
--- Script by Kekox.
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end

local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return true
end

local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end

if(t[1] > 365) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.")
return true
end

sender = getPlayerName(cid)

if t[2] then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have added ".. t[1] .." vip days to ".. t[2])
     doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE, sender .." just added you ".. t[1] .." vip days.")
end
return true
end
Code:
18:01 /adddays 1, whatever
18:01 You have added 1 vip days to whatever
Code:
18:01 Admin just added you 1 vip days.
 
@Limos
i know that i'm too rude to ask you more but i need one script more to check vip days for players may you make it please? if you can't its ok :p np
 
Add this message to the script you want and it will show how much vip days you have.
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have "..getPlayerVipDays(cid) .." vip days.")
 
Add this message to the script you want and it will show how much vip days you have.
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have "..getPlayerVipDays(cid) .." vip days.")
no i mean script for admin to check players vip days
 
Code:
function onSay(cid, words, param, channel)
     if param == '' then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
     end

     local pid = getPlayerByNameWildcard(param)
     if not isPlayer(pid) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
     end

     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(pid).." has "..getPlayerVipDays(pid) .." vip days.")
     return true
end
 
Last edited:
Code:
function onSay(cid, words, param, channel)
     if param == '' then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
     end

     local pid = getPlayerByNameWildcard(param)
     if not pid then
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
     end

     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(pid).." has "..getPlayerVipDays(pid) .." vip days.")
     return true
end
its working good with online players but with offline players got these erros
Code:
[29/12/2014 18:54:59] [Error - TalkAction Interface]
[29/12/2014 18:54:59] data/talkactions/scripts/checkvip.lua:onSay
[29/12/2014 18:54:59] Description:
[29/12/2014 18:54:59] (luaGetCreatureName) Creature not found

[29/12/2014 18:54:59] [Error - TalkAction Interface]
[29/12/2014 18:54:59] data/talkactions/scripts/checkvip.lua:onSay
[29/12/2014 18:54:59] Description:
[29/12/2014 18:54:59] (internalGetPlayerInfo) Player not found when requesting player info #19

[29/12/2014 18:54:59] [Error - TalkAction Interface]
[29/12/2014 18:54:59] data/talkactions/scripts/checkvip.lua:onSay
[29/12/2014 18:54:59] Description:
[29/12/2014 18:54:59] data/lib/050-function.lua:26: attempt to concatenate a boolean value
[29/12/2014 18:54:59] stack traceback:
[29/12/2014 18:54:59]     data/lib/050-function.lua:26: in function 'getPlayerVipDays'
[29/12/2014 18:54:59]     data/talkactions/scripts/checkvip.lua:11: in function <data/talkactions/scripts/checkvip.lua:1>
/checkvip Name
 
Back
Top