Alexs Posted April 26, 2012 Posted April 26, 2012 Que funcion usar para que el gas del graffiti en vez de "dañar" (eso no es problema por que en mi server no daña, y no me importa que tosa) te recupere vida, que function y eventos uso?
BorderLine Posted April 26, 2012 Posted April 26, 2012 cheka eso, nose si estara completo viewtopic.php?f=145&t=42526&p=429820&hilit=spray+health#p429820
iFoReX Posted April 26, 2012 Posted April 26, 2012 creo q con esto ---No me se una Function para obtener El arma pero buee getElementHealth setElementHealth onClientPlayerDamage
Araa Posted April 27, 2012 Posted April 27, 2012 function curar (attacker, attackerweapon, bodypart, loss) vida = getElementHealth (source) if (attackerweapon == 41) and (loss > 1) and ( vida < 99 ) then setElementHealth ( source, vida+15 ) end end addEventHandler ("onPlayerDamage", getRootElement(), curar ) Eso.. creo
Alexs Posted April 27, 2012 Author Posted April 27, 2012 si tengo un script que cancela el Evento onClientPlayerDamage, no hay problema? function stopDamage ( theplayer , attacker, weapon, bodypart ) cancelEvent() end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage )
Araa Posted April 27, 2012 Posted April 27, 2012 si tengo un script que cancela el Evento onClientPlayerDamage, no hay problema? function stopDamage ( theplayer , attacker, weapon, bodypart ) cancelEvent() end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage ) Si lo haces por separado si, agregale un evento a la funcion de curar, y triggealo en este ^ para que haci cancele el daño y cure. Porque sino no va a hacer nada
Alexs Posted April 27, 2012 Author Posted April 27, 2012 si tengo un script que cancela el Evento onClientPlayerDamage, no hay problema? function stopDamage ( theplayer , attacker, weapon, bodypart ) cancelEvent() end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopDamage ) Si lo haces por separado si, agregale un evento a la funcion de curar, y triggealo en este ^ para que haci cancele el daño y cure. Porque sino no va a hacer nada Ok, lo intentare, el unico problema es que no puedo jugar si no es por Local asi que necesito un server para testearlo.
Alexs Posted April 27, 2012 Author Posted April 27, 2012 #OFFTopic alex lo probamos en el mio ? vale, los subo a la comunidad MTA, el anti CarJack igual...
Recommended Posts