09.02.2012, 18:45
Introduction
Hi all
Just another script by me, easy automatic gates making, with one line, cool?
Features
Functions
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
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