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

!buyxp - XPBUY

enriel

Big L
Joined
Dec 14, 2007
Messages
1,254
Reaction score
2
Location
Montenegro
Anyone that can help me make a script like !buyxp, it basically takes 1 item and gives u instead 20mil exp. Anyone that can make it for me?
 
Code:
function onSay(cid, words, param)
local item = xxxx -- Id of the item which should be removed
local exp = 20000000 -- the exp which he should get
	if doPlayerRemoveItem(cid,item,1) == TRUE then
		doPlayerAddExp(cid, exp)
	else
		doPlayerSendCancel(cid,"You don't have the required item.")
	end
	return FALSE
end


kind regards, Evil Hero
 
@up;
You wasnt here when I was posting :(:(:(:(

Code:
local config = {
	xpToGive = 20000000,
	itemToRemove = 1234,
	itemCount = 1
	}
function onSay(cid, words, param)
	if doPlayerRemoveItem(cid, config.itemToRemove, config.itemCount) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bough "..config.xpToGive.." experience points.")
		doPlayerAddExp(cid, config.xpToGive)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You need "..config.itemCount.." "..getItemNameById(config.itemToRemove)..".")
	end
	return FALSE
end

for TFS 0.2 change getItemNameById to getItemName.
 
@up;
You wasnt here when I was posting :(:(:(:(

Code:
local config = {
	xpToGive = 20000000,
	itemToRemove = 1234,
	itemCount = 1
	}
function onSay(cid, words, param)
	if doPlayerRemoveItem(cid, config.itemToRemove, config.itemCount) == TRUE then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bough "..config.xpToGive.." experience points.")
		doPlayerAddExp(cid, config.xpToGive)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "You need "..config.itemCount.." "..getItemNameById(config.itemToRemove)..".")
	end
	return FALSE
end

for TFS 0.2 change getItemNameById to getItemName.

I've just made what he requested, so I didn't implemented any messages etc. :p

kind regards, Evil Hero
 
Back
Top