So...
This is my script for online in talkactions, !online
It see the players in pz, in trainer, in zone hunt..... i need that it see a playersvip....
I use the Mock Vip System:
name = "Vip system";
author = "Mock";
version = "1.0.0.0";
query="ALTER TABLE `accounts` ADD `vip_time` INT( 15 ) NOT NULL"
But for me not is vip_time is vipdays
Is possible u do a script that see vipdays of players?
This is my script for online in talkactions, !online
Code:
[QUOTE][/QUOTE]
[FONT="Arial"][COLOR="black"]local config = {
showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function onSay(cid, words, param, channel)
local players = getPlayersOnline()
local ostrings = {""}
local pstrings = {""}
local tstrings = {""}
local o, oposition = 1, 1
local p, pposition = 1, 1
local t, tposition = 1, 1
local l, lposition = 1, 1
local online = false
local pzone = false
local trainers = false
for _, pid in ipairs(players) do
if(online) then
if(o > (oposition * 7)) then
ostrings[oposition] = ostrings[oposition] .. ","
oposition = oposition + 1
ostrings[oposition] = ""
else
ostrings[oposition] = o == 1 and "" or ostrings[oposition] .. ", "
end
end
if(pzone) then
if(p > (pposition * 7)) then
pstrings[pposition] = pstrings[pposition] .. ","
pposition = pposition + 1
pstrings[pposition] = ""
else
pstrings[pposition] = p == 1 and "" or pstrings[pposition] .. ", "
end
end
if(trainers) then
if(t > (tposition * 7)) then
tstrings[tposition] = tstrings[tposition] .. ","
tposition = tposition + 1
tstrings[tposition] = ""
else
tstrings[tposition] = t == 1 and "" or tstrings[tposition] .. ", "
end
end
if ((config.showGamemasters or getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) or not getPlayerCustomFlagValue(pid, PlayerCustomFlag_GamemasterPrivileges)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
l = l + 1
end
if (getTilePzInfo(getCreaturePosition(pid)) == FALSE) and ((config.showGamemasters or getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) or not getPlayerCustomFlagValue(pid, PlayerCustomFlag_GamemasterPrivileges)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
if isCreature(getCreatureTarget(pid)) == TRUE then
if getCreatureName(getCreatureTarget(pid)) ~= "Train Machine" then
ostrings[oposition] = ostrings[oposition] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
o = o + 1
end
else
ostrings[oposition] = ostrings[oposition] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
o = o + 1
online = true
end
else
online = false
end
if (getTilePzInfo(getCreaturePosition(pid)) == TRUE) and ((config.showGamemasters or getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) or not getPlayerCustomFlagValue(pid, PlayerCustomFlag_GamemasterPrivileges)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
pstrings[pposition] = pstrings[pposition] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
p = p + 1
pzone = true
else
pzone = false
end
if ((config.showGamemasters or getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges) or not getPlayerCustomFlagValue(pid, PlayerCustomFlag_GamemasterPrivileges)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
if isCreature(getCreatureTarget(pid)) == TRUE then
if getCreatureName(getCreatureTarget(pid)) == "Train Machine" then
tstrings[tposition] = tstrings[tposition] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
t = t + 1
trainers = true
else
trainers = false
end
end
end
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, (l - 1) .. " Player(s) online on Empire World. They are:")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (o - 1) .. " Players(s) outside of PZ:")
for o, ostr in ipairs(ostrings) do
if(ostr:sub(ostr:len()) ~= ",") then
ostr = ostr .. "."
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ostr)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (p - 1) .. " Players(s) inside PZ:")
for p, pstr in ipairs(pstrings) do
if(pstr:sub(pstr:len()) ~= ",") then
pstr = pstr .. "."
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, pstr)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (t - 1) .. " Players(s) on trainers:")
for t, tstr in ipairs(tstrings) do
if(tstr:sub(tstr:len()) ~= ",") then
tstr = tstr .. "."
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, tstr)
end
return true
end[/COLOR][/FONT]
It see the players in pz, in trainer, in zone hunt..... i need that it see a playersvip....
I use the Mock Vip System:
name = "Vip system";
author = "Mock";
version = "1.0.0.0";
query="ALTER TABLE `accounts` ADD `vip_time` INT( 15 ) NOT NULL"
But for me not is vip_time is vipdays
Is possible u do a script that see vipdays of players?