flirtyboy23 Posted April 6, 2011 Posted April 6, 2011 function healFlowers (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss > 1) and ( theHealth < 80 ) then setElementHealth ( source, 100 ) takePlayerMoney (source, 100) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), healFlowers ) after heal medic can damage player with flowers how to make not able ? also -Hospital local EnterMarker = createMarker( 1607.22, 1816.25, 11.82, 'arrow', 2.0, 0, 255, 0, 150 ) function MarkerHit( hitElement, matchingDimension ) setElementInterior ( hitElement, 3, 389.85, 173.49, 1008.38 ) end addEventHandler( "onMarkerHit", EnterMarker, MarkerHit ) how to set dimension ? so for this their dimension is 1
CowTurbo Posted April 7, 2011 Posted April 7, 2011 function healFlowers (attacker, attackerweapon, bodypart, loss) theHealth = getElementHealth (source) if (attackerweapon == 14) and (loss > 1) and ( theHealth < 80 ) then cancelEvent() setElementHealth ( source, 100 ) takePlayerMoney (source, 100) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), healFlowers ) maybe something like that. -Hospital local EnterMarker = createMarker( 1607.22, 1816.25, 11.82, 'arrow', 2.0, 0, 255, 0, 150 ) function MarkerHit( hitElement, matchingDimension ) setElementInterior ( hitElement, 3, 389.85, 173.49, 1008.38 ) setElementDimension ( hitElement, 1 ) end addEventHandler( "onMarkerHit", EnterMarker, MarkerHit ) setElementDimension ( player argument, int dimension )
Castillo Posted April 7, 2011 Posted April 7, 2011 CowTurbo, the event onPlayerDamage can't be canceled, wiki note: It should also be noted that canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead.
Moderators Citizen Posted April 7, 2011 Moderators Posted April 7, 2011 CowTurbo, the event onPlayerDamage can't be canceled, wiki note:It should also be noted that canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead. So: function healFlowers (attacker, attackerweapon, bodypart, loss) if (attackerweapon == 14) then cancelEvent() end end addEventHandler ("onPlayerDamage", getRootElement(), healFlowers )
Moderators Citizen Posted April 7, 2011 Moderators Posted April 7, 2011 lol I seen: "the event onPlayerDamage can be canceled" instead of can't
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now