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

[REQUEST] 200k + Acress 2

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I wanted a script that when you speak the command /vip ,nome (Acress 5)
the player will win:
200.000 gold (200k) more acress 2.
rep+ :thumbup:
 
I don't understand what you want exactly..
God with access 5 say "/vip playername" and then the player gets 200k gold and is promoted to access 2 (senior tutor)???
 
Ok here you are :p

Create "vip.lua" in talkactions/scripts and add this:
PHP:
local config = {
	addCash = 200000,
	setAccess = 2
}
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required. [Player name as param]")
		return true
	end
	
	local target_player = getPlayerByName(param)

	if target_player == nil then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is either logged off or doesn't exist.")
		return true
	end

	doPlayerAddMoney(cid,config.addCash)
	doPlayerSetGroupId(cid, config.setAccess)

	return true
end

and in talkactions.xml add this line:
HTML:
<talkaction words="/vip" access="5" event="script" value="vip.lua"/>
 
Back
Top