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] .. " was not found.")
return true
end
end
pid = getPlayerByNameWildcard(t[2])
currentVip = getPlayerVipDays(pid)
if(t[1] > currentVip) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can not remove more VIP days than the player has, the player currently has ".. currentVip ..".")
return true
end
doRemoveVipDays(pid, t[1])
if(t[1] > 1) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "You have removed ".. t[1] .." VIP days from ".. t[2])
doPlayerSendTextMessage(pid,MESSAGE_STATUS_CONSOLE_ORANGE, "A god just removed ".. t[1] .." VIP days from you.")
return true
end
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "You have removed ".. t[1] .." VIP day from ".. t[2])
doPlayerSendTextMessage(pid,MESSAGE_STATUS_CONSOLE_ORANGE, "A god just removed ".. t[1] .." VIP day from you.")
return true
end