17.07.2012, 08:01
I have no pictures to provide because my gta laggs like shit
You do need sscanf, and also this was basiclly made for an RP server, down where it says "PlayerInfo[playerid][pMember] == 10)" There you change the 10 to whatever faction number you want having access to the gate open and close function
Add the mapping, then add the variables, then the command itself
Command to open/close
/taxigate which is for the gate to the parking lot
You do need sscanf, and also this was basiclly made for an RP server, down where it says "PlayerInfo[playerid][pMember] == 10)" There you change the 10 to whatever faction number you want having access to the gate open and close function
Add the mapping, then add the variables, then the command itself
Command to open/close
/taxigate which is for the gate to the parking lot
Код:
//MAPING
//Unity
CreateObject(987, 1811, -1911.4000244141, 16.200000762939, 0, 0, 90);
CreateObject(987, 1810.9000244141, -1923.1999511719, 16.200000762939, 0, 0, 90);
CreateObject(987, 1810.8000488281, -1935.1999511719, 16.200000762939, 0, 0, 90);
CreateObject(987, 1811, -1942.4000244141, 16.200000762939, 0, 0, 90);
CreateObject(987, 1799.0999755859, -1942.4000244141, 15.39999961853, 0, 0, 0);
CreateObject(987, 1787.0999755859, -1942.3000488281, 15.39999961853, 0, 0, 0);
CreateObject(987, 1781.8000488281, -1942.1999511719, 15.39999961853, 0, 0, 0);
CreateObject(987, 1769.6999511719, -1942, 12.60000038147, 0, 0, 0);
CreateObject(987, 1759.6999511719, -1941.9000244141, 12.60000038147, 0, 0, 0);
CreateObject(987, 1811.1999511719, -1906.4000244141, 12.60000038147, 0, 0, 90);
CreateObject(987, 1811, -1886.1999511719, 12.60000038147, 0, 0, 102);
CreateObject(1768, 1763, -1898, 12.60000038147, 0, 0, 90);
CreateObject(1768, 1764.6999511719, -1894.6999511719, 12.60000038147, 0, 0, 350);
CreateObject(1768, 1766.6999511719, -1898.9000244141, 12.60000038147, 0, 0, 188);
CreateObject(1827, 1765.3000488281, -1897, 12.60000038147, 0, 0, 0);
CreateObject(1484, 1765.6999511719, -1897.1999511719, 13.199999809265, 0, 23.999969482422, 2);
CreateObject(1484, 1765.0999755859, -1896.3000488281, 13.199999809265, 0, 23.999633789063, 1.99951171875);
CreateObject(1484, 1764.5999755859, -1897.5, 13.199999809265, 0, 23.999633789063, 1.99951171875);
CreateObject(1337, 1765.0999755859, -1897.4000244141, 13.10000038147, 86, 180, 180);
CreateObject(1575, 1765.0999755859, -1896.8000488281, 13.10000038147, 0, 0, 0);
CreateObject(14604, 1768.5999755859, -1897.0999755859, 13.5, 0, 0, 90);
CreateObject(615, 1775.1999511719, -1935.0999755859, 12.39999961853, 0, 0, 0);
CreateObject(615, 1805.5999755859, -1935, 12.39999961853, 0, 0, 0);
CreateObject(615, 1769.6999511719, -1905.5999755859, 12.60000038147, 0, 0, 0);
//Gates
//Open
CreateObject(971, 1811.3000488281, -1890.6999511719, 16, 0, 0, 270);
//Closed
CreateObject(971, 1811.3000488281, -1881.9000244141, 16, 0, 0, 270);
//Variables
new UnityGate
new UnityGateStatus
//The command
CMD:taxigate(playerid, params[])
{
new string[128]
if(PlayerInfo[playerid][pMember] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1811.3000488281, -1890.6999511719, 16)) {
if(UnityGateStatus == 0 ) {
format( string, sizeof(string), "* %s Uses their car/hand remote to open the gate." GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject(UnityGate, 1811.3000488281, -1881.9000244141, 16, 1);
UnityGateStatus = 1;
}
else {
format(string, sizeof(string), "* %s Uses their car/hand remote to close the gate." GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveObject(UnityGate, 1811.3000488281, -1890.6999511719, 16, 1);
UnityGateStatus = 0;
}
}
return 1;
}

