SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 10/06/2014, 11:06 PM   #1
DrakeX
Banned
 
Join Date: Dec 2011
Posts: 73
Reputation: 49
Post OnPlayerTakeDamage (Predator) Odd Weapon ID And Shooter Reported

OnPlayerTakeDamage seems to report weapon ID '255' and damaging player (or shooter) '65535'. It should report 31 (M4A1) simalar to the seasparrow and rustler, but doesn't. I'm assuming '65535' = INVALID_PLAYER_ID.

Edit (06/10/20140): I was incorrect about the weapon ID that is reported. Weapon ID '52' is reported, a weapon which isn't even documented on the weapons list!

Code:
[16:52:17] [SUCCESS]: Spawned a "Predator" (MODELID: 430, VEHICLEID: 1792)

[16:53:08] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 6);

[16:53:10] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 9);

[16:53:12] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 6);

[16:53:13] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 6);

[16:53:13] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 6);

[16:53:21] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 3);

[16:53:23] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 3);

[16:53:24] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 3);

[16:53:27] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 3);

[16:53:28] OnPlayerTakeDamage(1, 65535, 4.95000, 52, 3);
DrakeX is offline   Reply With Quote
Old 10/06/2014, 11:59 PM   #2
minijackc
Banned
 
Join Date: Jan 2012
Location: Im everywhere
Posts: 100
Reputation: 17
Default Re: OnPlayerTakeDamage (Predator)

Interesting, Maybe its the MODELID?
minijackc is offline   Reply With Quote
Old 16/06/2014, 09:34 PM   #3
DrakeX
Banned
 
Join Date: Dec 2011
Posts: 73
Reputation: 49
Default Re: OnPlayerTakeDamage (Predator)

No, it isn't the model ID. I however found this (which isn't documented on the weapons page): http://wiki.sa-mp.com/wroot/index.ph...:Weapon-52.gif

Weapon ID 52 has the same icon for night vision goggles, drowning as well as 255 (unknown).
DrakeX is offline   Reply With Quote
Old 17/06/2014, 10:18 AM   #4
iFarbod
Gangsta
 
Join Date: Jan 2014
Location: Los Santos (HD Universe)
Posts: 610
Reputation: 61
Default Re: OnPlayerTakeDamage (Predator)

Predator shots like Police Maverick shots (in single-player - when you have 3 or more wanted level). However in single-player. We can simulate that shots in CLEO By following opcode :

pawn Code:
06BC: create_M4_shoot_from 2193.268 -1165.441 1031.124 target $TEMPVAR_X_COORD $TEMPVAR_Y_COORD $TEMPVAR_Z_COORD energy 1

Vehicles can shot :
Quote:
Rhino == Explosion
Hunter == Minigun+Explosion
Rustler == M4
Seasparrow == M4
Hydra == Explosion+Heat seeking Rocket Launcher
RC Baron == Minigun (Sometimes M4)
*** These are retrieved from Kill-feed with OnPlayerDeath. ***
iFarbod is offline   Reply With Quote
Old 17/06/2014, 12:40 PM   #5
Baboon
Banned
 
Join Date: Nov 2010
Location: The Netherlands
Posts: 918
Reputation: 348
Default Re: OnPlayerTakeDamage (Predator)

65535 = INVALID_PLAYER_ID
Seems it doesn't detect the sparrow then, how about hunter/tank?
Perhaps it doesn't detect vehicles.
Baboon 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] OnPlayerTakeDamage(..) Matnix Tutorials 12 28/02/2015 01:13 PM
OnPlayerTakeDamage CriticalRP Scripting Help 19 11/12/2013 09:27 PM
predator problem sansko Help Archive 3 13/03/2011 10:07 PM
[FilterScript] Predator sansko Filterscripts 31 20/01/2011 07:12 PM


All times are GMT. The time now is 02:46 AM.


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