What's new

Skrypty & Kody problem z onEquip i onDeEquip

Status
Not open for further replies.

#NOOB

Senior User
Joined
May 25, 2014
Messages
901
Reaction score
89
Mam taki skrypt:
[lua]function onEquip(cid, item, slot)
doPlayerSendTextMessage(cid,24,"O KURWA ALE MAM ZAJEBISTY AMULET")
return true
end

function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid,24,"O KURWA ALE GOWNO ZE AZ MUSIALEM GO ZDJAC XD")
return true
end[/lua]
Ma on wy?wietli? odpowiedni komunikat zale?nie od tego czy za?o?? pewien amulet czy zdejm?.
Problem jest taki, ?e jak za?o?? amulet to wywala 3x wiadomo?? (gdzie powinien raz):

11:00 O KURWA ALE MAM ZAJEBISTY AMULET
11:00 O KURWA ALE MAM ZAJEBISTY AMULET
11:00 O KURWA ALE MAM ZAJEBISTY AMULET

Jedynie podczas zdejmowania jest oki.
Kto? mi mo?e wyja?ni? jak to poprawi??
 

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: problem z onEquip i onDeEquip

[lua]function onEquip(cid, item, slot)
local slots = getPlayerSlotItem(cid, slot)
if slots.itemid ~= item.itemid then
return true
end
doPlayerSendTextMessage(cid,24,"O KURWA ALE MAM ZAJEBISTY AMULET")
return true
end

function onDeEquip(cid, item, slot)
doPlayerSendTextMessage(cid,24,"O KURWA ALE GOWNO ZE AZ MUSIALEM GO ZDJAC XD")
return true
end[/lua]
 

#NOOB

Senior User
Joined
May 25, 2014
Messages
901
Reaction score
89
Odp: problem z onEquip i onDeEquip

Dzia?a, do zamkni?cia.
 
Status
Not open for further replies.
Top