SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 04/03/2017, 06:07 PM   #111
Barnwell
Banned
 
Join Date: May 2014
Location: England
Posts: 551
Reputation: 40
Default Re: 3DTryg Functions

Great job
Barnwell is offline   Reply With Quote
Old 23/03/2017, 01:49 PM   #112
RazorGuigo
Banned
 
Join Date: May 2016
Location: South is my Country
Posts: 1,139
Reputation: 104
Cool Very cooooool

@TOPIC: I really liked it, it was top!

@OFF: That hydra, is using veh color 3 & 4, or is it a mod?
RazorGuigo is offline   Reply With Quote
Old 23/03/2017, 05:02 PM   #113
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: Very cooooool

Quote:
Originally Posted by RazorGuigo View Post
@TOPIC: I really liked it, it was top!

@OFF: That hydra, is using veh color 3 & 4, or is it a mod?
This is mod Violet Hydra.
AbyssMorgan is offline   Reply With Quote
Old 26/03/2017, 07:22 AM   #114
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: 3DTryg Functions

Update v4.0.4:

- Support for Streamer v2.9.0

Last edited by AbyssMorgan; 02/04/2017 at 04:42 PM.
AbyssMorgan is offline   Reply With Quote
Old 02/04/2017, 04:41 PM   #115
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: 3DTryg Functions

Minor update v4.0.5:

- Update for FCNPC v1.7.0

- Fix ShiftLineRotationVecto (Possible division by Zero)
AbyssMorgan is offline   Reply With Quote
Old 05/04/2017, 04:14 PM   #116
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: 3DTryg Functions

Update v4.1.0:

- Added Functions:
PHP Code:
GetRandomPointInPolygon(Float:points[],&Float:tx,&Float:ty,maxpoints sizeof(points)); //Slow Prototype

GetRandomPointOnRectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,&Float:tx,&Float:ty);
GetRandomPointOnCube(Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz,&Float:tx,&Float:ty,&Float:tz);

//VehiclePartPosition by Ivan_Ino (Updated)
GetVehiclePartPos(vehicleid,partid,&Float:tx,&Float:ty,&Float:tz,Float:offset_x=0.0,Float:offset_y=0.0,Float:offset_z=0.0);

ShiftOffsetToPosition(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,Float:offset_x,Float:offset_y,Float:offset_z,&Float:tx,&Float:ty,&Float:tz);
ShiftPositionToOffset(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,&Float:offset_x,&Float:offset_y,&Float:offset_z,Float:tx,Float:ty,Float:tz); 
- Added ColAndreas Function:
PHP Code:
bool:GetWallRotation(Float:sx,Float:sy,Float:sz,Float:ex,Float:ey,Float:ez,&Float:rx,&Float:rz,&Float:px=0.0,&Float:py=0.0,&Float:pz=0.0,Float:size=1.0,Float:cut_size=0.0); 
- Update Algorithm for:
PHP Code:
GetRandomPointInRectangle(Float:minx,Float:miny,Float:maxx,Float:maxy,&Float:tx,&Float:ty);
GetRandomPointInCube(Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz,&Float:tx,&Float:ty,&Float:tz); 
- Update functions:
Code:
GetRandomPointOnStream(Stream:StreamData[Stream3D],&Float:x,&Float:y,&Float:z); //Update for Rectangle and Cube

SetPlayerAbsolutePosition(playerid,Float:x,Float:y,Float:z,Float:angle,worldid = -1,interiorid = -1,compensatedtime = -1,freezeplayer = 1);
SetPlayerAbsolutePositionVeh(playerid,Float:x,Float:y,Float:z,Float:angle,worldid = -1,interiorid = -1,compensatedtime = -1,freezeplayer = 1);

SetNPCAbsolutePosition(npcid,Float:x,Float:y,Float:z,Float:angle,worldid = -1,interiorid = -1,compensatedtime = -1,freezeplayer = 1);
- Added definitions:
PHP Code:
VEHICLE_PART_RFTIRE    // Right Front tire
VEHICLE_PART_LFTIRE    // Left Front tire
VEHICLE_PART_RRTIRE    // Right Rear tire
VEHICLE_PART_LRTIRE    // Left Rear tire
VEHICLE_PART_HOOD      // In Front
VEHICLE_PART_TRUNK     // Behind
VEHICLE_PART_ROOF      // Roof
VEHICLE_PART_CHASSIS   // Chassis
VEHICLE_PART_PETROLCAP // Petrolcap 
Download:
3DTryg.inc

Last edited by AbyssMorgan; 16/09/2017 at 08:31 AM.
AbyssMorgan is offline   Reply With Quote
Old 10/04/2017, 07:48 AM   #117
iSanchez
Huge Clucker
 
Join Date: Nov 2014
Posts: 246
Reputation: 4
Default Respuesta: 3DTryg Functions

I need help with this functions

Code:
 * GetRandomPointInCircle(Float:x,Float:y,Float:radius,&Float:tx,&Float:ty);                  
 * GetRandomPointOnCircle(Float:x,Float:y,Float:radius,&Float:tx,&Float:ty);
Any of them work, when I use GetRandomPointInCircle with the player x, y , it just returns the same point (x, y) to the tx and ty variables.



What I am trying to do is get a random position around the player (circle).



For example, I want create 7 objects around the player within a radius of 15,

It should look like this:




I want to "divide" the circle in N positions in order to spawn the objects around the player (like in the image above)
I already tried lots of things but no one work (I'm horrible at maths), so now I am looking for already maked include so I can avoid the script creation (I already have 6+ hours trying to do this with no success lol).



EDIT: HOLYSHIT I FINALLY DID IT AFTER POSTING THIS QUESTION! LOL
X3 OBJECTS

X10 OBJECTS

X15 OBJECTS


X10 AND X15 OBJECTS

Last edited by iSanchez; 10/04/2017 at 08:29 AM.
iSanchez is offline   Reply With Quote
Old 10/04/2017, 10:48 AM   #118
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: 3DTryg Functions

PHP Code:
for(new 020i++){
        
GetRandomPointOnClock(x,y,radius,tx,ty,tangle,single_clock(20,i));

AbyssMorgan is offline   Reply With Quote
Old 10/04/2017, 11:41 AM   #119
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 315
Reputation: 37
Default Re: 3DTryg Functions

Quote:
Originally Posted by AbyssMorgan View Post
PHP Code:
for(new 020i++){
        
GetRandomPointOnClock(x,y,radius,tx,ty,tangle,single_clock(20,i));

Look your pm.
Max_Andolini is offline   Reply With Quote
Old 10/04/2017, 05:01 PM   #120
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,211
Reputation: 352
Default Re: 3DTryg Functions

Update 4.1.1:

- Added Functions:
PHP Code:
Tryg3D::EulerToQuat(Float:rx,Float:ry,Float:rz,&Float:qw,&Float:qx,&Float:qy,&Float:qz);
Tryg3D::QuatToEuler(&Float:rx,&Float:ry,&Float:rz,Float:qw,Float:qx,Float:qy,Float:qz);
ShiftVectorRotation(Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz,&Float:tx,&Float:ty,&Float:tz); 
- Added Streamer Function:
PHP Code:
bool:IsVehicleFullyInDynamicArea(vehicleid,areaid); 
- Added Stream3D Function:
PHP Code:
bool:IsVehicleFullyInStream(vehicleid,Stream:StreamData[Stream3D]); 

Last edited by AbyssMorgan; 10/09/2017 at 10:06 PM.
AbyssMorgan 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] [INC] LSF - Lorenc's Simple Functions (w/ gang/clan functions) Lorenc_ Includes 14 21/04/2018 05:06 AM
What is the difference between public functions and stock functions? NeskWriter Scripting Help 1 16/10/2013 07:23 PM
File Functions + String Functions NoaM[W] Scripting Help 2 19/12/2012 09:13 PM
Pawno functions Doesn't Show on the functions Tab silvan Scripting Help 2 11/11/2012 10:42 AM
[Tool/Web/Other] Cross Functions V1.0 - Create Custom Call Backs / Functions by Just 1 Click CROSS_Hunter Tools and Files 7 05/11/2012 03:17 PM


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


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