• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Little ingame script for getting items :) Rep++

Damon

Check my status to contact me :)
Joined
Mar 26, 2011
Messages
6,219
Solutions
1
Reaction score
2,038
Location
Germany
Hey there, I am requesting a script :)
A talkaction :P
Would be glad if someone could do this^^

1.
Player should say "!donation xy".
Then , if he has xy(wanna change this aswell) cm tokens id xy(I will change id to mine), he gets item xy (i will change that):)

Please make such a script, and tell me, how I can edit those factors I mentioned above , myself :)

I will REP++ for sure!
Regards,
Tha Demon :)
Ups
//Damon
 
Last edited:
LUA:
local t = {
	a = 9020,
	b = "tokens", -- 9020 item name
	["sword"] = {2198, 10}
	--["words"] = {itemid, cost}
	}
function onSay(cid, words, param, channel)
local k = string.explode(param, ",")
	if (k[1] == '') then
		return doPlayerSendTextMessage(cid, 27, "Command param required.") and true
	end
	local s = 1
	if k[2] then
		s = k[2]
	end
	if getPlayerItemCount(cid, t.a, (t[k[1]][2])) then
		doPlayerRemoveItem(cid, t.a, (t[k[1]][2]))
		doPlayerAddItem(cid, (t[k[1]][1]), s)
		doSendAnimatedText(getPlayerPosition(cid), "Purchased!", math.random(1, 255))
	else
		doPlayerSendCancel(cid, "Sorry, you need "..(t[k[1]][2]).." "..t.b.." to buy this item")
	end
return TRUE
end
!buy sword, 3
--buys 3 swords--
!buy sword
--buys 1 sword--
 
Last edited:
Back
Top