Animera
* * * * *
I want a vip system working with items with a poins system.
I want the following talkactions:
!vipp PLAYERNAME , amount
!vipm PLAYERNAME , amount
!(donationitem) removes -XX from XXX storage
!vipp = plus XX (adds +XX in XXX storage)
!vipm = minus XX (removes -XX in XXX storage)
i gave it a try but it doesn't work:
I want the following talkactions:
!vipp PLAYERNAME , amount
!vipm PLAYERNAME , amount
!(donationitem) removes -XX from XXX storage
!vipp = plus XX (adds +XX in XXX storage)
!vipm = minus XX (removes -XX in XXX storage)
i gave it a try but it doesn't work:
PHP:
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, 35456) > 4 then
setPlayerStorageValue(player,35456,getPlayerStorageValue(player) - 4)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN, cid)
doCreatureSay(cid, "Congratulations you just bought solar axe.", TALKTYPE_ORANGE_1)
doCreateItemEx(8925, 1)
elseif getPlayerStorageValue(cid, 35456) < 4 then
doPlayerSendCancel(cid,'You have not enough points to buy this item.')
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF, cid)
return TRUE
end
end
PHP:
function onUse(cid, item, frompos, item2, topos)
doCreatureSay(cid, "CONGRATULATIONS! You got now 10 donation points", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 35456 + 10)
doRemoveItem(item.uid, 1)
return TRUE
end