What's new

OnDeath

Status
Not open for further replies.

BuRcZyK

Senior User
Joined
Sep 2, 2010
Messages
834
Reaction score
35
Witam, napisa?em skrypta na efekt gdy si? padnie ale gdy testowa?em i poszed?em noob harem pa?? to on tylko do by?o wszystko by pi?knie ale itemki (nawet bp) nie wypad?y. Ma kto? jakie? sugestie? I ?eby pomi?dzy doSendAnimated by? ma?y ost?p czasowy.
PHP:
function onDeath(cid, corpse, killer)
local posb = {x=491,y=501,z=7}
	if getPlayerLevel(cid) <= 50 then
doSendAnimatedText(getThingPos(cid), "O", TEXTCOLOR_RED)
doSendAnimatedText(posb, "Next Dead", TEXTCOLOR_RED)
else
doSendAnimatedText(posb, "Next Dead", TEXTCOLOR_RED)

end
return
end

Znasz si? na spellach? Pom?? tutaj!
 
Joined
Jan 6, 2011
Messages
552
Reaction score
65
Odp: OnDeath

Code:
local p = {x = 491, y = 501, z = 7}
function onDeath(cid, corpse, killer)
	return (getPlayerLevel(cid) <= 50 and doSendAnimatedText(getThingPos(cid), "O", TEXTCOLOR_RED) and doSendAnimatedText(p, "Next Dead", TEXTCOLOR_RED) or doSendAnimatedText(p, "Next Dead", TEXTCOLOR_RED))
end
 

BuRcZyK

Senior User
Joined
Sep 2, 2010
Messages
834
Reaction score
35
Odp: OnDeath

Dobrze, ale jak zrobi? ?eby przedzia?y by?y odst?py czasowe pomi?dzy doSend~ bo mam kilka tak
 
Joined
Jan 6, 2011
Messages
552
Reaction score
65
Odp: OnDeath

Code:
addEvent(funkcja, czas, parametry)
, np.
Code:
addEvent(doSendAnimatedText, 500, getThingPos(cid), "O", TEXTCOLOR_RED)
 
Status
Not open for further replies.
Top