SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 13/05/2015, 08:39 AM   #21
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,698
Reputation: 1177
Default Re: Players Library (callbacks, functions, and addons)

OnPlayerWeaponShot callback wouldn't work because it's not hooked properly in "playerfuncs.inc".
Lordzy is offline   Reply With Quote
Old 13/05/2015, 09:07 AM   #22
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,773
Reputation: 858
Default Re: Players Library (callbacks, functions, and addons)

Quote:
Originally Posted by Lordzy View Post
OnPlayerWeaponShot callback wouldn't work because it's not hooked properly in "playerfuncs.inc".
Yes, thanks for notifying me. Previously you mentioned that bug in playercalls.inc and i checked, it was correct, should have been playerfuncs.inc.

Updated playerfuncs.inc

EDIT: actually i realized, i had fucked up the links(placing wrong code in wrong link). Just fixed that!
__________________

Follow me on Github: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 13/05/2015, 01:51 PM   #23
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,698
Reputation: 1177
Default Re: Players Library (callbacks, functions, and addons)

You can also improve this library a lot. For instance, you can replace using a lot of boolean variables by using bitflags - http://forum.sa-mp.com/showthread.php?t=216730
Lordzy is offline   Reply With Quote
Old 17/05/2015, 02:41 AM   #24
TazmaNiax
Big Clucker
 
TazmaNiax's Avatar
 
Join Date: Apr 2014
Location: Indonesia
Posts: 134
Reputation: 8
Default Re: Players Library (callbacks, functions, and addons)

Weehh, i like your work!
__________________
nope
TazmaNiax is offline   Reply With Quote
Old 17/05/2015, 04:22 PM   #25
PT
Godfather
 
PT's Avatar
 
Join Date: Nov 2012
Location: Europe
Posts: 7,180
Reputation: 803
Default Re: Players Library (callbacks, functions, and addons)

Why dont you use github instead of the pastebin?

Anyway nice job.
PT is offline   Reply With Quote
Old 17/05/2015, 04:27 PM   #26
n0minal
High-roller
 
n0minal's Avatar
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,046
Reputation: 789
Default Re: Players Library (callbacks, functions, and addons)

Very nice, congrats
n0minal is offline   Reply With Quote
Old 17/05/2015, 04:48 PM   #27
SpikY_
High-roller
 
SpikY_'s Avatar
 
Join Date: Jul 2014
Posts: 1,246
Reputation: 128
Default Re: Players Library (callbacks, functions, and addons)

Good work.
__________________
-
SpikY_ is offline   Reply With Quote
Old 19/05/2015, 05:05 AM   #28
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Re: Players Library (callbacks, functions, and addons)

Very nice.
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 09/06/2015, 04:52 PM   #29
PeterJane
Big Clucker
 
PeterJane's Avatar
 
Join Date: Dec 2014
Posts: 118
Reputation: 13
Default Re: Players Library (callbacks, functions, and addons)

Hi Gammix, before anything else, well done!

I've got a question.

Can I use IsPlayerFacingPlayer to create an object that simulates player hitbox? For example they are both in a duel and I create an object away from the players body to show exactly where either party should shoot on each other? Thanks.
PeterJane is offline   Reply With Quote
Old 10/06/2015, 04:40 AM   #30
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,773
Reputation: 858
Default Re: Players Library (callbacks, functions, and addons)

The answer is YES and NO, both.

Actually you can use IsPlayerFacingPlayer to detect if the player's facing angle is in range of opponents facing angle.
But NO, because what if the player's camera is opposite and viewing somewhere else. So for this you would have to also use a function like: IsPlayerVisibleOnPlayerScreen to check if the player camera is also pointed towards the opponent.

You can use this include: http://forum.sa-mp.com/showthread.php?t=480286 (WorldToScreen) and IsPlayerFacingPlayer both for that purpose.

If i am wrong, then probably i didn't understand your question properly.
__________________

Follow me on Github: Donate on Paypal:

Gammix 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] How to hook Functions and Callbacks. Lordzy Tutorials 20 11/11/2017 09:57 PM
[Include] [INC]Area functions and callbacks. Backwardsman97 Includes 8 04/11/2011 07:09 AM
[Tutorial] Callbacks and Functions : Important difference Kwarde Tutorials 5 23/07/2011 08:35 AM
[Tutorial] How to hook FUNCTIONS (not callbacks) Luka P. Tutorials 17 13/06/2011 05:35 PM
Useful Functions and Callbacks Re-release Larcius Filterscripts 12 24/06/2010 03:34 PM


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


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