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

setPlayerCap(cid, newcap)

igorbr

New Member
Joined
Jan 9, 2008
Messages
34
Reaction score
0
I want to add a function in my server!
this function change the maximum player Cap:

exemple:
getPlayerCap (cid)
setPlayerCap (cid, newcap)


somebody can help me?
thanks!!!:p
 
This one can work for you: getPlayerFreeCap(cid)

Example

local playerCap = getPlayerFreeCap(cid)
local item = 2393 --Giant Sword
local itemweight = getItemWeight(item, 1)
if playerCap >= itemweight then
doPlayerSendTextMessage(cid,22,'You have found a giant sword.')
doPlayerAddItem(cid,item,1)
else
doPlayerSendTextMessage(cid, 22, 'You have found a giant sword weighing ' ..itemweight.. ' oz it\'s too heavy.')
 
Back
Top