Plate Posted June 9, 2013 Posted June 9, 2013 Hola tengo un problema con este script es que no funciona y ni idea por que tampoco da error function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then setTimer(triggerClientEvent, 9000, 0, root, "onBossFire", root, boss, attacker) outputChatBox("estas asdasd", attacker, 0, 255, 255) end end end Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Bc# Posted June 9, 2013 Posted June 9, 2013 esta mal la sintaxis del setTimer, intenta con: function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then setTimer(function() triggerClientEvent(root, "onBossFire", root, boss, attacker) end, 9000, 0) outputChatBox("estas asdasd", attacker, 0, 255, 255) end end end Bc Media Clan XPG Foro mtasa://104.223.20.159:21003
Alexs Posted June 9, 2013 Posted June 9, 2013 Hola tengo un problema con este script es que no funciona y ni idea por que tampoco da error function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then setTimer(triggerClientEvent, 9000, 0, root, "onBossFire", root, boss, attacker) outputChatBox("estas asdasd", attacker, 0, 255, 255) end end end Muestra ejecutas la función 'checkAttacker'. Developer @ MYVAL
Plate Posted June 9, 2013 Author Posted June 9, 2013 Hola tengo un problema con este script es que no funciona y ni idea por que tampoco da error function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then setTimer(triggerClientEvent, 9000, 0, root, "onBossFire", root, boss, attacker) outputChatBox("estas asdasd", attacker, 0, 255, 255) end end end Muestra ejecutas la función 'checkAttacker'. la ejecuto con onPedDamage pero no funciona tampoco PD:El triggerClientEvent esta bien Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted June 9, 2013 Posted June 9, 2013 Hola tengo un problema con este script es que no funciona y ni idea por que tampoco da error function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then setTimer(triggerClientEvent, 9000, 0, root, "onBossFire", root, boss, attacker) outputChatBox("estas asdasd", attacker, 0, 255, 255) end end end Muestra ejecutas la función 'checkAttacker'. la ejecuto con onPedDamage pero no funciona tampoco PD:El triggerClientEvent esta bien 'onPedDamage' no existe. Developer @ MYVAL
Plate Posted June 9, 2013 Author Posted June 9, 2013 Uh lol no sabia gracias PD:Que evento uso Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted June 9, 2013 Posted June 9, 2013 Uh lol no sabia graciasPD:Que evento uso Hazlo en client-side con 'onClientPedDamage' Developer @ MYVAL
Plate Posted June 9, 2013 Author Posted June 9, 2013 Client: function checkAttacker(attacker, weapon, bodypart) if isElement(attacker) then if (getElementType("attacker") == "player") then triggerServerEvent("attackerChecked", localPlayer, attacker) end end end addEventHandler("onClientPedDamage", root, checkAttacker) server: function attacked(attacker) setTimer(triggerClientEvent, 9000, 0, root, "onBossFire", root, boss, attacker) end addEvent("attackerChecked", true) addEventHandler("attackerChecked", root, attacked) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts