[Include] S32_AutoGates - Create automatic gate with just one line!
#1

Introduction

Hi all
Just another script by me, easy automatic gates making, with one line, cool?



Features
  • Creating automatic gates with just on line
  • 11 functions
  • Very optimized

Functions
pawn Code:
/*

 • Function: CreateAutoGate(modelid, Float: X, Float: Y, Float: Z, Float: rX, Float: rY, Float: rZ, Float: NewX, Float: NewY, Float: NewZ, Float: Speed)
 • Usage: Creating automatic gate!
 • Parameters:
        modelid: ID of object
        X, Y, Z, rX, rY, rZ: position and rotation of object
        NewX, NewY, NewZ: New poistion of object
        Speed: Speed of object when he moves
 • Example: CreateAutoGate(969, 1019.00000000,-1846.69995117,12.30000019,0.00000000,0.00000000,280.00000000, 1019.00000000,-1846.69995117,9.60000038, 3.0);

*/


/*

 • Function: DestroyAutoGate(gateid)
 • Usage: Destroying automatic gate!
 • Parameters:
        gateid: ID of specific gate
 • Example: DestroyAutoGate(1);

*/


/*

 • Function: GetTotalAutoGates()
 • Usage: Getting all created gates!
 • Parameters:
        no parameteres
 • Example: printf("Total auto gates: %d", GetTotalAutoGates());

*/


/*

 • Function: GetAutoGatePos(gateid, &Float: x, &Float: y, &Float: z)
 • Usage: Getting position of gate!
 • Parameters:
        X, Y, Z: Parameters in which will be stored position
 • Example:
 new Float: Pos[3];
 GetAutoGatePos(2, Pos[0], Pos[1], Pos[2]);
 printf("Gate X: %f, Gate Y: %f, Gate Z: %f", Pos[0], Pos[1], Pos[2]);

*/


/*

 • Function: GetAutoGateNewPos(gateid, &Float: x, &Float: y, &Float: z)
 • Usage: Getting new position of autogate!
 • Parameters:
        X, Y, Z: Parameters in which will be stored new position
 • Example:
 new Float: Pos[3];
 GetAutoGateNewPos(2, Pos[0], Pos[1], Pos[2]);
 printf("Gate New X: %f, Gate New Y: %f, Gate New Z: %f", Pos[0], Pos[1], Pos[2]);

*/


/*

 • Function: GetAutoGateRot(gateid, &Float: x, &Float: y, &Float: z)
 • Usage: Getting rotation of gate!
 • Parameters:
        X, Y, Z: Parameters in which will be stored rotation
 • Example:
 new Float: Pos[3];
 GetAutoGateRot(2, Pos[0], Pos[1], Pos[2]);
 printf("Gate rot X: %f, Gate rot Y: %f, Gate rot Z: %f", Pos[0], Pos[1], Pos[2]);

*/


/*

 • Function: IsPlayerInRangeOfAutoGate(playerid, gateid, Float: Range)
 • Usage: Checking is player in range of specific gate!
 • Parameters:
        playerid: ID of player
        gateid: ID of gate
        Range: range in which can player be
 • Example:
 if(IsPlayerInRangeOfAutoGate(playerid, 4, 10.0) SendClientMessage(playerid, -1, "You are in range of auto gate 4");

*/


/*

 • Function: IsPlayerInRangeOfAnyAutoGate(playerid, Float: Range)
 • Usage: Checking is player in range of any gate!
 • Parameters:
        playerid: ID of player
        Range: range in which can player be
 • Example:
 if(IsPlayerInRangeOfAnyAutoGate(playerid, 10.0) SendClientMessage(playerid, -1, "You are in range of some auto gate");

*/


/*

 • Function: GetAutoGateModelID(gateid)
 • Usage: Getting the model of gate!
 • Parameters:
        gateid: ID of gate
 • Example:
 printf("Model ID of gate 2 is: %d", GetAutoGateModelID(2));
 
*/


/*

 • Function: GetAutoGateSpeed(gateid, &Float: Speed)
 • Usage: Getting the speed of gate!
 • Parameters:
        gateid: ID of gate
        Speed: Parametere in which will be stored speed
 • Example:
 new Float: Speed;
 GetAutoGateSpeed(12, Speed);
 printf("Speed of gate 12 is: %f", Speed);

*/


/*

 • Function: IsValidAutoGate(gateid)
 • Usage: Checking is specific gate valid gate!
 • Parameters:
        gateid: ID of gate
 • Example:
 if(IsValidAutoGate(2)) printf("Gate 2 is valid!");

*/

Necessary things

y_timers by Y_Less
foreach by Y_Less



Download

Pastebin (v1.0.0)


Mediafire (v1.0.0)


Solidfiles (v1.0.0)



Credits

System32 - Almost everything
Y_Less - y_timers & foreach
Reply
#2

Very nice, gonna use it!

(It wont allow me to add rep+, wth)
Reply
#3

Nice
Reply
#4

Coool
Reply
#5

Good job, i will use it for my gamemode !
Reply
#6

thanks guys!

@fiki - Lol when I want to give you rep. I get that fucking message :S
Reply
#7

Nice dude very nice
Reply
#8

eehm i get this errors when adding it to my script:
Code:
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(26) : error 001: expected token: ";", but found "-identifier-"
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(268) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(270) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(272) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(274) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(275) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(278) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(279) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\pawno\include\S32_AutoGates.inc(281) : error 010: invalid function or declaration
D:\Program Files\[0.3d]my own drifting gamemode\gamemodes\TorettoRacing1.pwn(15513) : warning 203: symbol is never used: "YSI_gS"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
pls help with this...
Reply
#9

Did you just put it as include or you integrer it in your script?

Also did you edit script?

Line 26 in my include is

new Iterator: AutoGates<MAX_AUTOGATES>, agID;

but there is ;
Reply
#10

Nice work System64.
Reply
#11

Tips:
* Why use y_timers when you only use a function once? That just requires extra download + includes to have for one function. (Regular timer will do)

* Include all the necessary includes in the download
Reply
#12

So, with y_timers is more optimized, if you are to lazy, I don't care about it

I wont, you know how to use search on this forum or ******!
Reply
#13

i used it as include... but whats wrong then? do i have to add something to my script?
Reply
#14

hmm, strange problems...

You just put #include <S32_AutoGates> and than you got the errors?
Reply
#15

Quote:
Originally Posted by System64
Посмотреть сообщение
So, with y_timers is more optimized, if you are to lazy, I don't care about it

I wont, you know how to use search on this forum or ******!
Didn't expected a rude reply. Also, since when is y_timers optimized? Seriously, having to load the whole YSI system just for 1 timer?

I'm not even going to use this system, but ( guy in first page reporting errors ), it should be easier for the guys that download it to use the system at ease.

(Also, foreach was implemented in ysi, why have it as a separate inc?)
Reply
#16

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
Didn't expected a rude reply. Also, since when is y_timers optimized? Seriously, having to load the whole YSI system just for 1 timer?

I'm not even going to use this system, but ( guy in first page reporting errors ), it should be easier for the guys that download it to use the system at ease.

(Also, foreach was implemented in ysi, why have it as a separate inc?)
Will you stop complain about YSI?

If they don't want this system they wont download it and use it, if they want they will download system and YSI
Reply
#17

yes i just include it and then get that errors... and when i remove the include from my gm then it doesnt gives errors...

btw im using my gamemode TorettoRacing, maybe you should download it from my publish thing and check if it compiles with it....( i have edited mine but maybe it will also give the errors in that script i have)
Reply
#18

umm, no idea, i'll try to help you when I get home
Reply
#19

Nice
Reply
#20

wow nice work man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)