I have Not Seen Any Realise On This So I Realiese It.
Add This Into
Data/Talkactions/talkactions.xml
And Add This To Data/Talkactions/Scripts
Rep++ Please AND SCRIPT IS NOT MADE BY ME!
Add This Into
Data/Talkactions/talkactions.xml
HTML:
<talkaction log="yes" words="/addvip" event="script" value="vip.lua"/>
<talkaction log="yes" words="/takevip" event="script" value="vip.lua"/>
And Add This To Data/Talkactions/Scripts
HTML:
function onSay(cid,words,param)
local requiredGroup = 3
local vipStorageValue = 11551
local target = getPlayerByNameWildcard(param)
if words == '/addvip' then
if target > 0 then
if getPlayerGroupId(cid) >= requiredGroup and param ~= "" and getPlayerStorageValue(target, vipStorageValue) == -1 then
adminName = getPlayerName(cid)
setPlayerStorageValue(target, vipStorageValue, 1)
doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are now a V.I.P. member. '..adminName..' gave you the V.I.P.')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You made a V.I.P. member to "..param..".")
elseif getPlayerGroupId(cid) < requiredGroup then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't make V.I.P. member to anyone.")
elseif getPlayerStorageValue(target, vipStorageValue) ~= -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is already a V.I.P. member.")
end
else
doPlayerSendTextMessage(cid, 21, "This player doesn't exists or is not online.")
end
elseif words == '/takevip' then
if target > 0 then
if getPlayerGroupId(cid) >= requiredGroup and param ~= "" and getPlayerStorageValue(target, vipStorageValue) == 1 then
adminName = getPlayerName(cid)
setPlayerStorageValue(target, vipStorageValue, -1)
doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are now a normal player. '..adminName..' took your V.I.P.')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You took the V.I.P. of "..param..".")
elseif getPlayerGroupId(cid) < requiredGroup then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't take the V.I.P. of anyone.")
elseif getPlayerStorageValue(target, vipStorageValue) ~= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is not a V.I.P. member.")
end
else
doPlayerSendTextMessage(cid, 21, "This player doesn't exists or is not online.")
end
end
return TRUE
end
Rep++ Please AND SCRIPT IS NOT MADE BY ME!