pawn Код:
//VICE LORDS GANG HQ GATE (OPEN/CLOSE)
#include <a_samp>
#include <AutoGates>
new AutoGate;
#define MAX_GATES 200
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
return;
public OnGameModeInit()
{
AddStaticVehicleEx(409,162.32910156,-1343.83105469,69.48502350,0.00000000,3,3); //Stretch
AddStaticVehicleEx(421,167.91847229,-1340.07141113,69.71347809,270.00000000,3,3); //Washington
AddStaticVehicleEx(566,174.33859253,-1339.24328613,69.58541870,270.00000000,3,3); //Tahoma
AddStaticVehicleEx(469,186.27767944,-1324.70544434,81.38770294,0.00000000,-1,-1); //Sparrow
AddStaticVehicleEx(487,180.50346375,-1309.78088379,80.95986938,0.00000000,3,3); //Maverick
AddStaticVehicleEx(400,191.44903564,-1299.94726562,70.43199158,0.00000000,3,3); //Landstalker
AddStaticVehicleEx(470,192.44485474,-1293.86718750,70.38651276,0.00000000,-1,-1); //Patriot
AddStaticVehicleEx(489,195.18124390,-1303.15588379,70.53976440,0.00000000,3,3); //Rancher
AddStaticVehicleEx(495,181.26232910,-1288.18176270,70.64285278,0.00000000,3,3); //Sandking
AddStaticVehicleEx(495,176.85002136,-1288.20239258,70.54370880,0.00000000,3,3); //Sandking
AddStaticVehicleEx(561,169.90994263,-1287.08776855,69.75140381,90.00000000,3,1); //Stratum
AddStaticVehicleEx(579,163.98316956,-1286.64160156,69.92073059,90.00000000,3,1); //Huntley
AddStaticVehicleEx(468,162.01780701,-1275.14819336,70.60180664,0.00000000,3,1); //Sanchez
AddStaticVehicleEx(468,164.01513672,-1275.40209961,70.61403656,0.00000000,3,1); //Sanchez
AddStaticVehicleEx(471,166.20639038,-1275.77941895,70.43155670,0.00000000,3,1); //Quad
AddStaticVehicleEx(471,168.44345093,-1276.13513184,70.43738556,0.00000000,3,1); //Quad
AddStaticVehicleEx(521,159.79728699,-1274.82482910,70.49311829,0.00000000,3,1); //FCR-900
AddStaticVehicleEx(521,157.95309448,-1274.60986328,70.47967529,0.00000000,3,1); //FCR-900
AddStaticVehicleEx(522,170.67050171,-1275.86022949,70.59796143,0.00000000,3,1); //NRG-500
AddStaticVehicleEx(522,172.30851746,-1275.85156250,70.65825653,0.00000000,3,1); //NRG-500
AddStaticVehicleEx(581,174.22583008,-1276.19531250,70.72059631,0.00000000,3,1); //BF-400
AddStaticVehicleEx(581,175.97457886,-1276.47607422,70.74649048,0.00000000,3,1); //BF-400
AddStaticVehicleEx(413,169.64978027,-1269.98571777,71.92987061,0.00000000,3,1); //Pony
AddStaticVehicleEx(459,165.99606323,-1269.25854492,71.88700104,0.00000000,3,1); //Berkley's RC Van
AddStaticVehicleEx(482,172.94053650,-1269.60302734,72.21617126,0.00000000,3,1); //Burrito
AddStaticVehicle(456,161.94020081,-1266.89965820,72.12973022,0.00000000,3,1); //Yankee
CreateObject(980,211.02011108,-1350.35791016,52.12198639,0.00000000,0.00000000,224.00000000); //object(airportgate) (1)
CreateObject(988,161.86094666,-1349.18701172,72.08569336,0.00000000,0.00000000,340.00000000); //object(ws_apgate) (1)
CreateObject(988,158.44479370,-1345.70397949,71.77626038,0.00000000,0.00000000,293.99938965); //object(ws_apgate) (2)
CreateObject(988,156.86425781,-1340.49975586,71.53889465,0.00000000,0.00000000,277.99414062); //object(ws_apgate) (3)
CreateObject(988,156.52642822,-1334.41333008,71.58616638,0.00000000,0.00000000,273.99304199); //object(ws_apgate) (4)
CreateObject(988,156.15884399,-1329.02136230,71.59511566,0.00000000,0.00000000,271.98803711); //object(ws_apgate) (5)
CreateObject(988,155.99658203,-1323.48339844,71.65405273,0.00000000,0.00000000,271.98303223); //object(ws_apgate) (6)
CreateObject(988,155.89140320,-1317.95263672,71.97616577,0.00000000,0.00000000,267.98303223); //object(ws_apgate) (7)
CreateObject(988,156.03776550,-1312.40673828,72.03080750,0.00000000,0.00000000,267.97851562); //object(ws_apgate) (8)
CreateObject(988,156.48156738,-1306.77111816,71.94460297,0.00000000,0.00000000,267.97851562); //object(ws_apgate) (9)
CreateObject(988,156.26622009,-1301.16760254,71.98289490,0.00000000,0.00000000,269.97851562); //object(ws_apgate) (10)
CreateObject(988,156.46040344,-1295.45703125,72.00697327,0.00000000,0.00000000,269.97851562); //object(ws_apgate) (11)
CreateObject(988,156.39706421,-1289.41027832,72.24242401,0.00000000,0.00000000,267.97802734); //object(ws_apgate) (12)
CreateObject(988,156.53059387,-1283.54260254,72.32376862,0.00000000,0.00000000,267.97302246); //object(ws_apgate) (13)
CreateObject(988,156.69242859,-1277.72790527,72.33527374,0.00000000,0.00000000,267.97302246); //object(ws_apgate) (14)
CreateObject(988,156.85542297,-1271.85144043,72.43562317,0.00000000,0.00000000,265.97302246); //object(ws_apgate) (15)
CreateObject(988,157.61587524,-1266.46301270,72.48545837,0.00000000,0.00000000,255.96801758); //object(ws_apgate) (16)
CreateObject(988,159.13928223,-1260.72375488,72.84960938,0.00000000,0.00000000,251.96496582); //object(ws_apgate) (17)
CreateObject(988,160.40211487,-1255.52575684,73.93511963,0.00000000,0.00000000,245.96044922); //object(ws_apgate) (18)
CreateObject(988,162.63293457,-1251.55895996,77.35630798,0.00000000,0.00000000,237.95642090); //object(ws_apgate) (19)
CreateObject(988,164.74545288,-1252.42565918,77.08693695,0.00000000,0.00000000,135.95288086); //object(ws_apgate) (21)
CreateObject(988,168.84628296,-1256.06018066,78.01535034,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (22)
CreateObject(988,172.99459839,-1260.01611328,78.06869507,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (23)
CreateObject(988,177.00929260,-1263.84387207,78.03833008,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (24)
CreateObject(988,181.03015137,-1267.67736816,77.99487305,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (25)
CreateObject(988,185.00735474,-1271.46936035,77.98442078,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (26)
CreateObject(988,188.99674988,-1275.27465820,78.00336456,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (27)
CreateObject(988,192.95483398,-1279.05114746,77.95414734,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (28)
CreateObject(988,197.28628540,-1283.18371582,77.80872345,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (29)
CreateObject(988,201.19413757,-1286.91223145,77.78999329,0.00000000,0.00000000,135.95031738); //object(ws_apgate) (30)
CreateObject(988,202.84245300,-1291.38330078,77.82865143,0.00000000,0.00000000,95.95031738); //object(ws_apgate) (31)
CreateObject(988,203.40863037,-1296.65588379,77.85607910,0.00000000,0.00000000,99.94909668); //object(ws_apgate) (32)
CreateObject(988,204.61456299,-1302.16552734,77.70083618,0.00000000,0.00000000,115.94812012); //object(ws_apgate) (33)
CreateObject(988,207.24021912,-1308.48217773,77.07702637,0.00000000,0.00000000,135.94421387); //object(ws_apgate) (34)
CreateObject(988,210.45477295,-1312.73364258,76.98437500,0.00000000,0.00000000,133.94189453); //object(ws_apgate) (35)
CreateObject(988,213.93176270,-1316.43957520,76.66592407,0.00000000,0.00000000,131.93835449); //object(ws_apgate) (36)
CreateObject(988,217.56678772,-1321.37158203,76.23738098,0.00000000,0.00000000,127.93481445); //object(ws_apgate) (37)
CreateObject(988,205.05027771,-1329.15356445,71.67263794,0.00000000,0.00000000,29.93029785); //object(ws_apgate) (38)
CreateObject(988,200.13304138,-1332.04626465,71.45658875,0.00000000,0.00000000,29.92675781); //object(ws_apgate) (39)
CreateObject(988,195.34323120,-1334.54150391,71.34196472,0.00000000,0.00000000,27.92675781); //object(ws_apgate) (40)
CreateObject(988,190.30845642,-1337.18505859,71.27558899,0.00000000,0.00000000,27.92175293); //object(ws_apgate) (41)
CreateObject(988,184.99798584,-1339.91064453,71.30516052,0.00000000,0.00000000,27.92175293); //object(ws_apgate) (42)
CreateObject(988,179.92504883,-1342.48547363,71.20962524,0.00000000,0.00000000,29.92175293); //object(ws_apgate) (43)
CreateObject(988,177.21836853,-1345.44262695,71.91830444,0.00000000,0.00000000,55.92126465); //object(ws_apgate) (44)
CreateObject(988,175.00735474,-1348.98547363,70.08517456,0.00000000,0.00000000,91.92041016); //object(ws_apgate) (45)
CreateObject(1434,189.63897705,-1306.61376953,69.25091553,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_5a) (1)
CreateObject(1434,190.92149353,-1306.61096191,69.27816772,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_5a) (2)
CreateObject(1434,189.70828247,-1309.65893555,69.24941254,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_5a) (3)
CreateObject(1434,191.14640808,-1309.63537598,69.27999115,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_5a) (4)
//VL Gate
AutoGate=AddAutoGate(980,211.02011108,-1350.35791016,52.12198639,0.00000000,0.00000000,224.00000000,211.02011108,-1350.35791016,52.12198639 ,[VC],0)
return 1;
}
public OnGameModeExit()
{ return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
SetTimerEx( "AGCheck", 750, true, "i", playerid );
forward AGCheck(playerid);
public AGCheck( playerid );
{
if ( IsPlayerInRangeOfPoint(playerid, Float: range, Float: x, Float: y, Float: z ) )
{
MoveObject(AutoGate,215.02011108,-1350.35791016,52.12198639,50);//normal gate open
}
else
{
MoveObject(AutoGate,211.02011108,-1350.35791016,52.12198639,0,50 );//normal gate close
}
return 1;
}
return 0;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/vicelordsHQ",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Welcome to ~r~Vice Lords HQ",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,211.02011108,-1350.35791016,52.12198639);
}
SetPlayerPos(playerid,211.02011108,-1350.35791016,52.12198639);
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Welcome to ~r~Vice Lords HQ",4000,6);
return 1;
}
}
public OnVehicleSpawn(vehicleid)
{ return 1;
}
public OnVehicleDeath(vehicleid, killer)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
#endif