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

PlayerSetLossPercent

white91

New Member
Joined
Jun 4, 2008
Messages
136
Reaction score
0
Hello, i need to set for all players in my ots
doPlayerSetLossPercent(cid, 0, 4)
doPlayerSetLossPercent(cid, 1, 4)
doPlayerSetLossPercent(cid, 2, 4)
doPlayerSetLossPercent(cid, 3, 4)

How i can do it by mysql?
 
UPDATE `players` SET `loss_experience` = '4', `loss_mana` = '4', `loss_skills` = '4', `loss_items` = '4'
 
INSERT INTO `players` ( `loss_experience` , `loss_mana` , `loss_skills` , `loss_items` ) VALUES ( '4' , '4' , '4' , '4' );
 
my problem is:
i make amulet of life script:
storage1 = 25678 -- save the normal lose procent of player
storage2 = 25679 -- save the normal lose procent of player
storage3 = 25680 -- save the normal lose procent of player
storage4 = 25681 -- save the normal lose procent of player

function onEquip(cid, item, slot)
setPlayerStorageValue(cid, storage1, getPlayerLossPercent(cid, 0))
setPlayerStorageValue(cid, storage2, getPlayerLossPercent(cid, 1))
setPlayerStorageValue(cid, storage3, getPlayerLossPercent(cid, 2))
setPlayerStorageValue(cid, storage4, getPlayerLossPercent(cid, 3))

doPlayerSetLossPercent(cid, 0, 0)
doPlayerSetLossPercent(cid, 1, 0)
doPlayerSetLossPercent(cid, 2, 0)
doPlayerSetLossPercent(cid, 3, 0)
end

function onDeEquip(cid, item, slot)
doPlayerSetLossPercent(cid, 0, setPlayerStorageValue(cid, storage1))
doPlayerSetLossPercent(cid, 1, setPlayerStorageValue(cid, storage2))
doPlayerSetLossPercent(cid, 2, setPlayerStorageValue(cid, storage3))
doPlayerSetLossPercent(cid, 3, setPlayerStorageValue(cid, storage4))
end

and when player use it one time they don't lose any exp when die next times and i need to change it;/
 
Back
Top