SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/07/2014, 11:16 PM   #11
Corekt
Big Clucker
 
Join Date: May 2013
Posts: 74
Reputation: 47
Default Re: rTurret - Easily create interactive turrets!

Update: Version 1.1



Added new getters and setters.
pawn Code:
GetTurretOwner(turretid);
GetTurretMaterial(turretid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename);
pawn Code:
SetTurretOwner(turretid, playerid);
SetTurretMaterial(turretid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0);



New extra function:
pawn Code:
ToggleTurretTargetFocus(turretid, toggle);
ToggleTurretTargetFocus toggles whether the turret reserves its damage for the player it's aiming at while ignoring other targets. If enabled, players apart from the target won't take damage even if they get caught in the crossfire. Use this for turret aiming behaviors (TURRET_BEHAVIOR_AIM_CLOSEST - TURRET_BEHAVIOR_AIM_CUSTOM). Target focus is off by default.



In addition, rTurret now supports alternate British English spelling of macros and functions containing the words "behavior" or "color".
pawn Code:
#define TURRET_BEHAVIOUR_STATIONARY                 TURRET_BEHAVIOR_STATIONARY
#define TURRET_BEHAVIOUR_ROTATE_CLOCKWISE           TURRET_BEHAVIOR_ROTATE_CLOCKWISE
#define TURRET_BEHAVIOUR_ROTATE_COUNTERCLOCKWISE    TURRET_BEHAVIOR_ROTATE_COUNTERCLOCKWISE
#define TURRET_BEHAVIOUR_AIM_CLOSEST                TURRET_BEHAVIOR_AIM_CLOSEST
#define TURRET_BEHAVIOUR_AIM_FARTHEST               TURRET_BEHAVIOR_AIM_FARTHEST
#define TURRET_BEHAVIOUR_AIM_WEAKEST                TURRET_BEHAVIOR_AIM_WEAKEST
#define TURRET_BEHAVIOUR_AIM_STRONGEST              TURRET_BEHAVIOR_AIM_STRONGEST
#define TURRET_BEHAVIOUR_AIM_RANDOM                 TURRET_BEHAVIOR_AIM_RANDOM
#define TURRET_BEHAVIOUR_AIM_SINGLE                 TURRET_BEHAVIOR_AIM_SINGLE
#define TURRET_BEHAVIOUR_AIM_CUSTOM                 TURRET_BEHAVIOR_AIM_CUSTOM

#define GetTurretBehaviour                          GetTurretBehavior
#define SetTurretBehaviour                          SetTurretBehavior
#define GetTurretBulletColour                       GetTurretBulletColor
#define SetTurretBulletColour                       SetTurretBulletColor

Bug fixes:
  • Fixed a bug where the turret bullets disappeared even if they hit its owner or a player on its team.
  • Turret damages greater than a player's health and armor combined now instantly kill the player whereas previously it took two hits to do so.
  • Turrets now don't shoot upon creation if checkarea is enabled and there are no targets in its range.
__________________
My ReleasesDescription
rTurretInteractive turrets for SA-MP!
Attached Objects Ex More functions for Player Attached Objects (including MoveAttachedObject).
Corekt is offline   Reply With Quote
Old 22/07/2014, 01:28 PM   #12
iFarbod
Gangsta
 
Join Date: Jan 2014
Location: Los Santos (HD Universe)
Posts: 610
Reputation: 61
Default Re: rTurret - Easily create interactive turrets!

Amazing!
iFarbod is offline   Reply With Quote
Old 24/07/2014, 11:39 PM   #13
DemME
Huge Clucker
 
Join Date: Oct 2013
Location: forum.sa-mp.com Money: 1,982,120
Posts: 295
Reputation: 13
Default Re: rTurret - Easily create interactive turrets!

Seems good
DemME is offline   Reply With Quote
Old 28/06/2015, 02:16 AM   #14
Onfroi
Banned
 
Join Date: Jan 2012
Location: Dallas, Texas
Posts: 1,504
Reputation: 226
Default Re: rTurret - Easily create interactive turrets!

Sorry for bump.
But why does my console spam with "*** Streamer Plugin: Streamer_IsInArrayData: Invalid ID specified" when the turret is active? Also, if you want to add line-of-sight check this out.
Onfroi is offline   Reply With Quote
Old 28/06/2015, 02:32 AM   #15
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,324
Reputation: 652
Default Re: rTurret - Easily create interactive turrets!

Quote:
Originally Posted by Onfroi View Post
Also, if you want to add line-of-sight check this out.
Eww. That's one of the worst way to do this. This is precisely why ColAndreas was created.
Crayder is offline   Reply With Quote
Old 28/06/2015, 03:00 AM   #16
Onfroi
Banned
 
Join Date: Jan 2012
Location: Dallas, Texas
Posts: 1,504
Reputation: 226
Default Re: rTurret - Easily create interactive turrets!

Quote:
Originally Posted by Crayder View Post
Eww. That's one of the worst way to do this. This is precisely why ColAndreas was created.
Well, didn't know Pottus actually released it.
Onfroi is offline   Reply With Quote
Old 28/06/2015, 10:54 AM   #17
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠ ͟ل͜ ͡)ง fight me irl
Posts: 708
Reputation: 293
Default Re: rTurret - Easily create interactive turrets!

Quite cool. Good job on this
__________________
dead
Sellize is offline   Reply With Quote
Old 28/06/2015, 12:49 PM   #18
Gasman
Little Clucker
 
Gasman's Avatar
 
Join Date: May 2015
Location: VietNam
Posts: 33
Reputation: 73
Default Re: rTurret - Easily create interactive turrets!

Amazing.
Gasman is offline   Reply With Quote
Old 29/06/2015, 06:04 AM   #19
Konverse
Gangsta
 
Konverse's Avatar
 
Join Date: Apr 2015
Location: CookieZone
Posts: 783
Reputation: 151
Default Re: rTurret - Easily create interactive turrets!

Oh my God this is so amazing I can't believe someone made this possible nice job
__________________

SA-MP Player since 2007, officially forum registered in 2015
Konverse is offline   Reply With Quote
Old 30/06/2015, 12:15 AM   #20
Corekt
Big Clucker
 
Join Date: May 2013
Posts: 74
Reputation: 47
Default Re: rTurret - Easily create interactive turrets!

Quote:
Originally Posted by Onfroi View Post
Sorry for bump.
But why does my console spam with "*** Streamer Plugin: Streamer_IsInArrayData: Invalid ID specified" when the turret is active?
Are you running the rTurret filterscript alongside a script already using the include? That would cause the callbacks to execute twice, once after an object/area's destroyed, hence the console spam.

New version for 0.3.7 in the works, stay tuned.
__________________
My ReleasesDescription
rTurretInteractive turrets for SA-MP!
Attached Objects Ex More functions for Player Attached Objects (including MoveAttachedObject).
Corekt 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
[Include] mGates (Easily create automatic gates with one function!) MP2 Includes 37 06/03/2018 03:05 AM
[Include] >>> San Andreas Telecom - Create a phone system easily <<< ACI Includes 12 15/02/2014 05:09 PM
[Include] k_target - Create a target easily [0.3Z] kadaradam Includes 5 25/01/2014 07:24 PM
[Tool/Web/Other] J_Dialog Code Generator [Create dialog easily!] Jarnu Tools and Files 9 19/11/2012 05:35 AM
[Include] CreateVehicleForPlayer - Use Names to create vehicles, Easily. iPLEOMAX Includes 29 28/06/2012 10:59 AM


All times are GMT. The time now is 07:24 PM.


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