[Include] Miki!Gates - Easy Gate Creation!
#1

Introduction

Hi there :> This is my first English section release. It's very easy to work with this include. Basically you just need to add. and it's closed and you move and it opens and you move again it closes again. Have fun ^^

Functions

PHP код:
forward AddNewGate(gateidmodelidFloat:oXFloat:oYFloat:oZFloat:RoXFloat:RoYFloat:RoZFloat:cXFloat:cYFloat:cZFloat:Speed);
forward MoveGate(gateid); 
Credits

Miki - Include
Icognito - Streamer
Mommy - Me
SAMP Dev team - SA-MP

Downloads

PHP код:
#include <a_samp>
#include <streamer>
#define MAX_GATES 10
#define GATE_DRAW_DISTANCE 200
#define GATE_INFO_X_OPENED 0
#define GATE_INFO_Y_OPENED 1
#define GATE_INFO_Z_OPENED 2
#define GATE_INFO_X_CLOSED 3
#define GATE_INFO_Y_CLOSED 4
#define GATE_INFO_Z_CLOSED 5
#define GATE_INFO_SPEED 6
forward AddNewGate(gateidmodelidFloat:oXFloat:oYFloat:oZFloat:RoXFloat:RoYFloat:RoZFloat:cXFloat:cYFloat:cZFloat:Speed);
forward MoveGate(gateid);
new 
aGates[MAX_GATES];
new 
Float:aGateInfo[MAX_GATES][7];
new 
aGateCreate[MAX_GATES];
new 
aGateMoved[MAX_GATES];
public 
AddNewGate(gateidmodelidFloat:oXFloat:oYFloat:oZFloat:RoXFloat:RoYFloat:RoZFloat:cXFloat:cYFloat:cZFloat:Speed)
{
    new 
iLoop;
     while(
iLoop <= MAX_GATES)
     {
         if(
aGates[iLoop] == 0)
         {
            
aGates[iLoop]                             = true;
            
aGateInfo[iLoop][GATE_INFO_X_OPENED]    = oX;
            
aGateInfo[iLoop][GATE_INFO_Y_OPENED]    = oY;
            
aGateInfo[iLoop][GATE_INFO_Z_OPENED]     = oZ;
            
aGateInfo[iLoop][GATE_INFO_X_CLOSED]    = cX;
            
aGateInfo[iLoop][GATE_INFO_Y_CLOSED]    = cY;
            
aGateInfo[iLoop][GATE_INFO_Z_CLOSED]    = cZ;
            
aGateInfo[iLoop][GATE_INFO_SPEED]         = Speed;
            
aGateCreate[iLoop]                      = CreateDynamicObject(modelidoXoYoZRoXRoYRoZ, -, -1, -1GATE_DRAW_DISTANCE );
            
printf(" --- Miki!Gates: You have sucessfully defined gate ID:%d. Now, It's ready to be moved"gateid);
            break;
        }
         else 
iLoop++;
     }
}
public 
MoveGate(gateid)
{
    if(
aGates[gateid])
    {
        if(!
aGateMoved[gateid])
        {
            
MoveDynamicObject(gateidaGateInfo[gateid][GATE_INFO_X_CLOSED], aGateInfo[gateid][GATE_INFO_Y_CLOSED], aGateInfo[gateid][GATE_INFO_Z_CLOSED], aGateInfo[gateid][GATE_INFO_SPEED] );
            
aGateMoved[gateid] = true;
        }
        else
        {
            
MoveDynamicObject(gateidaGateInfo[gateid][GATE_INFO_X_OPENED], aGateInfo[gateid][GATE_INFO_Y_OPENED], aGateInfo[gateid][GATE_INFO_Z_OPENED], aGateInfo[gateid][GATE_INFO_SPEED] );
            
aGateMoved[gateid] = false;
        }
    }
    else 
printf(" --- Miki!Gates: The Gate ID:%d isn't defined. If you want to move it, add it first!"gateid);
        

http://pastebin.com/8Ayge1Lm



Reply
#2

look cool...
i will test it
Reply
#3

Nice work
Reply
#4

should add more like
deletegate and something like that.. anyway nice
Reply
#5

NICE
Reply
#6

Thanks guys :>
Reply
#7

NICE
Reply
#8

Nice
Reply
#9

Nice Jobs Man ..
I Will Test It ..

Reply
#10

Thanks.
Reply
#11

Nice Work
Reply
#12

nice work dude
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)