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

Spadajace itemy na glebe

Ldrozd

Piszę skrypty w zeszycie.
Joined
Dec 13, 2008
Messages
430
Reaction score
2
Location
Guess where!
Jest jakas funkcja, która sprawdzilaby czy gracz ma miejsce, zeby np. zrobic quest. Nie chce po prostu, aby sie zdarzylo, ze po kliknieciu na skrzynke item spadnie na glebe.

ofc bedzie rep++ ^^
 
sprawdzasz wagę przedmiotu i wolny cap.

getItemWeightById(itemid, count[, precise])
getItemWeight(uid[, precise])
getPlayerFreeCap(cid)

Przykład z LUA_FUNCTIONS:
PHP:
Example
					local playerCap = getPlayerFreeCap(cid)
					local item = 2393 --Giant Sword
					local itemweight = getItemWeight(item, 1)
					if playerCap >= itemweight then
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a giant sword.')
						doPlayerAddItem(cid,item)
					else
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found a giant sword weighing ' ..itemweight.. ' oz it\'s too heavy.')
 
Last edited:
Mozna miec capa i zero miejsca w plecaku. Item spadnie. Juz zrobilem ograniczenie if'em jesli chodzi o cap.
 
jest taki piekny quest system w tfsie
a tak na marginesie, czy Ty czasem nie uzywasz kilku kont?
 
Poszukaj w shop.lua wydaje mi się że jak nie było miejsca w bp itd to wywalało komunikat.
 
Nom w shop.lua jest to. Jednakze tam jest od cholery zmiennych i ciezko mi jest to ogarnac, ale sprobuje jeszcze raz :)
Dzieki

@specjalist
Specjalist to moje drugie konto. Nie nie mam. Btw az tak bardzo chcesz, abym byl zbanowany? :p
 
Back
Top