Vandal - 2009-01-24 14:24:34

Tworzymy w data\actions\scripts ziolo.lua i wpisujemy w nim takie cos:

Spoiler:
MAX_FOOD = 500
function onUse(cid, item, frompos, item2, topos)
-- Get food value depending on item.itemid
food = 60
if (getPlayerFood(cid) + food > MAX_FOOD) then
doPlayerSendCancel(cid,"Przecpalem sie...")
return 1
end
doPlayerFeed(cid,food)
doRemoveItem(item.uid,1)
doPlayerAddHealth(cid,-100)
doSendMagicEffect(topos,2)
doPlayerSay(cid,"Pale ziolo, jest wesolo!",1)
return 1
end

Później w actions.xml (data\actions\) dodajemy taka linijkę:

<action itemid="2802" script="ziolo.lua" />

To nie moj skrypt

Thetimelord - 2009-01-24 16:33:17

LoL xD

www.magisterka-opiekuncza.pun.pl www.samp-forum.pun.pl www.waracademy.pun.pl www.agh1rokis.pun.pl www.jaroslawskiots.pun.pl