Kills problem

Elexonic
em Scripts

Elexonic

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/11Posts: 30

 function onKill(cid, target)
    if isPlayer(target) == TRUE then 
		    if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayerParty(target))) and isPlayer(target)then
				    broadcastMessage("**** has killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)

   elseif getCreatureSkullType(cid) == 4 or getCreatureSkullType(cid) == 3 and getCreatureSkullType(target) == 0 and isPlayer(target)then
				    broadcastMessage("**** has killed ".. getCreatureName(target).." (UnJustified)",MESSAGE_STATUS_WARNING)

   elseif getCreatureSkullType(target) == 3 or getCreatureSkullType(target) == 4 and isPlayer(target) then
				    broadcastMessage("**** has killed ".. getCreatureName(target).." (Justified)",MESSAGE_STATUS_WARNING)	 

   end

    end
    return TRUE
end

 

 

Eu tenho esse script e ele funciona bem, o problema é este.

Se três jogadores me matar .. três vezes a mensagem.

Se eu matar seis jogadores de seis vezes a mensagem para fora.

 

Eu quero apenas ir uma vez que você ver um para cada jogador.

lool

Caronte

Ex-Moderador de Scripting
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 25/09/10Posts: 1341Gênero: Masculino

Acho que o erro é nessa tag :

 

function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

Elexonic

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/11Posts: 30

Bump!

lool

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

amigo upar topicos eh contra as regras do forum, por favor nao repita isso!

tente trocar esse teu script por esse..

 

function onDeath(cid, corpse, deathList)

local pid = deathList[1]

if isPlayer(cid) and isPlayer(pid) then

if ((isInParty(cid) and isInParty(pid)) and (getPlayerParty(pid) == getPlayerParty(cid))) then

broadcastMessage("**** has killed ".. getCreatureName(cid).." (Justified)", MESSAGE_STATUS_WARNING)

elseif getCreatureSkullType(pid) == 4 or getCreatureSkullType(pid) == 3 and getCreatureSkullType(cid) == 0 then

broadcastMessage("**** has killed ".. getCreatureName(cid).." (UnJustified)",MESSAGE_STATUS_WARNING)

elseif getCreatureSkullType(cid) == 3 or getCreatureSkullType(cid) == 4 then

broadcastMessage("**** has killed ".. getCreatureName(cid).." (Justified)",MESSAGE_STATUS_WARNING)

end

end

return TRUE

end

 

nao esquece de trocar na tag tb para "death" q nem a aki de baixo \/

<event type="death" name="xxxx" event="script" value="yyyy.lua"/>

 

@Krhiegen

mano da onde tu tiro isso? o.O

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Elexonic

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/11Posts: 30

não funciona, não dá nenhum erro, mas não deixar qualquer mensagem

lool

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

mudase a tag? e o script ta registrado no login.lua?

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Elexonic

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/11Posts: 30

FIxed..

lool