• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Vip

freak15

Professional Hoster
Joined
Dec 31, 2008
Messages
356
Reaction score
2
Location
Sweden
I have Not Seen Any Realise On This So I Realiese It.

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!
 
Back
Top