Actors BUGs!
#1

I was testing actors, the recent updated. And unfortunately there are few bugs which are annoying:
1. When i shot actor with a DEAGLE, they die instantly.(i haven't tested any other weapon yet, I tried fist it worked well)
2. When actor's health set to 0, they die; But there is no function for spawning them!
Reply
#2

1. Use https://sampwiki.blast.hk/wiki/SetActorHealth
2. Use https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor to check if actors hp is 0, than destroy actor, recreate, set his health back, applyanimation or whatever you want.

But there is still one problem, OnPlayerGiveDamageActor is not called if you apply animation on actor.
Reply
#3

https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor, thats the only way of detecting and thats where i just performed
pawn Код:
SetActorHealth(damaged_actorid, helath - amount);
But DEAGLE gives one shot one kill!
Reply
#4

Set their health to 200hp or so after you create them. Deagle is dealing 70 damage.
Reply
#5

And thats wrong. The rest weapons are giving normal damage.

If i set to 200, then how will manage damage from other weapons?
Reply
#6

You can reduce damage dealt by deagle, create you own damage system by reported weapon id in that callback. Don't use amount given by callback.

pawn Код:
new Float:damage;
if(weaponid == 24) damage = 25.0;//deagle
else if(weaponid == 34) damage = 35.0;//sniper

if(weaponid == 24 || weaponid == 34)
{
    SetActorHealth(damaged_actorid, helath - damage);
}
else
{
    SetActorHealth(damaged_actorid, helath - amount);
}
Reply
#7

Actually not deagle only; Here is a list of damage done by each weaponnot all)
  • Knife: 4.0
  • Shotgun: 150.0
  • MP5: 25.0
  • M4: 30.0
  • Sniper: 125.0
  • Deagle: 140.0
  • Chainsaw: 41.0
  • Colt 9mm: 25.0
  • UZI: 20.0
  • Country Rifle: 75.0
  • RPG: 250.0
  • Grenade: 250.0
Actually, i think all of them are wrong.(according to weapons.dat)

Its not hard to code a custom damage system(i have been working on it in PEDS.inc) but time consuming and hard to structure an absolute and accurate damage system. You have to take care of damage, range, height, and maybe bodyparts.
Reply
#8

It looks like, that these are values of damage, which you normally inflict to vehicles with the guns. When you shoot at player or NPC, you inflict only 33% damage compared to car. This was probably unintentional bug and might be fixed in upcoming revision.
Reply
#9

set actor health to Float_INFINITY at y_utils:
#define FLOAT_INFINITY (Float:0x7F800000)

lol
Reply
#10

Also, I noticed SetActorFacingAngle doesn't update actor's facing angle, until the actor is restreamed for player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)