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

Lua How do I set X capacity to a player.

Core_

Well-Known Member
Joined
Jul 9, 2010
Messages
1,557
Solutions
1
Reaction score
50
Well I'm trying with "doPlayerSetMaxCapacity(cid,x)", but seems like it doesn't work as I wan't to, so i want a way to do like setPlayerCap(cid,cap), i don't really know how to aply sql here so maybe some one can help me xd.

I wan't it to make a script onLogin, set X cap when a player logs in.

Also I found this but I don't have a clue.

in player.cpp

LUA:
	purchaseCallback = saleCallback = -1;
	level = shootRange = 1;
	rates[SKILL__MAGLEVEL] = rates[SKILL__LEVEL] = 1.0f;
	soulMax = 100;
	capacity = 400.00;
	stamina = STAMINA_MAX;
	lastLoad = lastPing = lastPong = OTSYS_TIME();

I wan't the capacity to be 6 (max) but it just doesn't work players just doesn't have any cap xd
 
Last edited:
Edit the sql code by your info

SQL:
UPDATE  `Put your database name here`.`players` SET  `cap` =  '400'

if you want set X capacity to X player then add this to the end of the code and edit the players.id by the id of the player

SQL:
WHERE  `players`.`id` =player;
 
nvm I just figured out that, that won't be a good solution, so I'm wondering if there's a way to remove the weight on items (editing sources).
 
Last edited:
Back
Top