SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/05/2015, 08:50 AM   #1
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Actors BUGs!

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!
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 01/05/2015, 08:55 AM   #2
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 484
Reputation: 60
Default Re: Actors BUGs!

1. Use http://wiki.sa-mp.com/wiki/SetActorHealth
2. Use http://wiki.sa-mp.com/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.
Dragony92 is offline   Reply With Quote
Old 01/05/2015, 09:09 AM   #3
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Re: Actors BUGs!

http://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor, thats the only way of detecting and thats where i just performed
pawn Code:
SetActorHealth(damaged_actorid, helath - amount);

But DEAGLE gives one shot one kill!
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 01/05/2015, 09:12 AM   #4
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 484
Reputation: 60
Default Re: Actors BUGs!

Set their health to 200hp or so after you create them. Deagle is dealing 70 damage.
Dragony92 is offline   Reply With Quote
Old 01/05/2015, 09:21 AM   #5
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Re: Actors BUGs!

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

If i set to 200, then how will manage damage from other weapons?
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 01/05/2015, 09:25 AM   #6
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 484
Reputation: 60
Default Re: Actors BUGs!

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 Code:
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);
}
Dragony92 is offline   Reply With Quote
Old 01/05/2015, 09:31 AM   #7
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,772
Reputation: 854
Default Re: Actors BUGs!

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.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 01/05/2015, 09:57 AM   #8
niCe
Huge Clucker
 
niCe's Avatar
 
Join Date: Mar 2008
Location: CZ
Posts: 392
Reputation: 424
Default Re: Actors BUGs!

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.
__________________
[ENG] s2.gta-multiplayer.cz:7777 WTLS 2 (Singleplayer Features)
[ENG] s3.gta-multiplayer.cz:7777 WTLS 3 (Singleplayer Features)

- Pool, basketball, golf, Poker Texas Holdem, races and other minigames
- Video game QUB3D
- Roulette, blackjack, slots, video poker and horse-betting
- Stock market BAWSAQ
- Organizations and offices
- Missions from Big Smoke, Sweet, Zero, Cesar or Woozie!
- Gang wars
- More than 30 jobs (police, paramedic, firefighter, burglar, pimp, valet, pizza-boy and more)
- Gyms, strip clubs, clothes shops, hidden packages, oysters, spray tags, horseshoes and more
Watch the TRAILER
Servers are hosted at Evolution Host
niCe is offline   Reply With Quote
Old 01/05/2015, 10:02 AM   #9
RaeF
Huge Clucker
 
Join Date: Dec 2014
Location: Indonesia
Posts: 261
Reputation: 27
Default Re: Actors BUGs!

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

lol
RaeF is offline   Reply With Quote
Old 03/05/2015, 06:50 PM   #10
niCe
Huge Clucker
 
niCe's Avatar
 
Join Date: Mar 2008
Location: CZ
Posts: 392
Reputation: 424
Default Re: Actors BUGs!

Also, I noticed SetActorFacingAngle doesn't update actor's facing angle, until the actor is restreamed for player.
__________________
[ENG] s2.gta-multiplayer.cz:7777 WTLS 2 (Singleplayer Features)
[ENG] s3.gta-multiplayer.cz:7777 WTLS 3 (Singleplayer Features)

- Pool, basketball, golf, Poker Texas Holdem, races and other minigames
- Video game QUB3D
- Roulette, blackjack, slots, video poker and horse-betting
- Stock market BAWSAQ
- Organizations and offices
- Missions from Big Smoke, Sweet, Zero, Cesar or Woozie!
- Gang wars
- More than 30 jobs (police, paramedic, firefighter, burglar, pimp, valet, pizza-boy and more)
- Gyms, strip clubs, clothes shops, hidden packages, oysters, spray tags, horseshoes and more
Watch the TRAILER
Servers are hosted at Evolution Host
niCe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Actors!(0.3.7 RC6) Abagail Tutorials 31 25/06/2018 07:33 PM
Actors ATomas Scripting Help 17 30/04/2015 04:55 PM
Any voice actors? Lucky™ Everything and Nothing 4 22/01/2015 12:02 PM
NPC < Bots vs Actors > RSX General 6 25/09/2010 07:38 PM


All times are GMT. The time now is 07:21 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.