Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- //#if defined FILTERSCRIPT
- new gates1;
- new gates2;
- new gates3;
- new gates4;
- new gates5;
- new gates6;
- new gates7;
- new gates8;
- #define grey 0xB4B4B4FF
- public OnFilterScriptInit()
- {
- SetTimer("Gates1Check", 500, true);
- SetTimer("Gates2Check", 500, true);
- SetTimer("Gates3Check", 500, true);
- SetTimer("Gates4Check", 500, true);
- SetTimer("Gates5Check", 500, true);
- SetTimer("Gates6Check", 500, true);
- SetTimer("Gates7Check", 500, true);
- SetTimer("Gates8Check", 500, true);
- gates1 = CreateObject(8674, 1780.80004883, 701.40002441, 15.80000019, 0.00000000, 0.00000000, 352.00000000);
- gates2 = CreateObject(8674, 1795.40002441, 713.09997559, 14.89999962, 0.00000000, 0.00000000, 354.00000000);
- gates3 = CreateObject(971, -2667.80004883, 1277.90002441, 56.29999924, 0.00000000, 0.00000000, 0.00000000);
- gates4 = CreateObject(971, -2677.30004883, 1277.59997559, 56.29999924, 0.00000000, 0.00000000, 0.00000000);
- gates5 = CreateObject(971, -2686.19995117, 1271.50000000, 56.29999924, 0.00000000, 0.00000000, 178.00000000);
- gates6 = CreateObject(971, -2695.39990234, 1270.59997559, 56.20000076, 0.00000000, 0.00000000, 178.00000000);
- gates7 = CreateObject(975, -1674.90002441, 548.09997559, 38.90000153, 0.00000000, 0.00000000, 318.00000000);
- gates8 = CreateObject(975, -1658.19995117, 545.09997559, 38.90000153, 0.00000000, 0.00000000, 136.00000000);
- //gate = CreateObject(Model id, x, y, z, rx, ry, rz); = How to set up the gate. Use the closed position
- return 1;
- }
- forward Gates1Check(playerid);
- public Gates1Check(playerid)
- {
- new gates1_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, 1780.80004883, 701.40002441, 15.80000019))gates1_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates1_status)MoveObject(gates1, 1780.69995117, 701.40002441, 12.80000019, 0.5);
- else MoveObject(gates1, 1780.80004883, 701.40002441, 15.80000019, 6.5);
- return;
- }
- forward Gates2Check(playerid);
- public Gates2Check(playerid)
- {
- new gates2_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, 1795.40002441, 713.09997559, 14.89999962))gates2_status=1;
- }
- if(gates2_status)MoveObject(gates2, 1795.40002441, 713.09997559, 12.00000000, 0.5);
- else MoveObject(gates2, 1795.40002441, 713.09997559, 14.89999962, 6.5);
- return;
- }
- forward Gates3Check(playerid);
- public Gates3Check(playerid)
- {
- new gates3_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -2667.80004883, 1277.90002441, 56.29999924))gates3_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates3_status)MoveObject(gates3, -2667.80004883, 1277.90002441, 48.59999847, 1.0);
- else MoveObject(gates3, -2667.80004883, 1277.90002441, 56.29999924, 6.5);
- return;
- }
- forward Gates4Check(playerid);
- public Gates4Check(playerid)
- {
- new gates4_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -2677.30004883, 1277.59997559, 56.29999924))gates4_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates4_status)MoveObject(gates4, -2677.30004883, 1277.59997559, 48.09999847, 1.0);
- else MoveObject(gates4, -2677.30004883, 1277.59997559, 56.29999924, 6.5);
- return;
- }
- forward Gates5Check(playerid);
- public Gates5Check(playerid)
- {
- new gates5_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -2686.19995117, 1271.50000000, 56.29999924))gates5_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates5_status)MoveObject(gates5, -2686.19995117, 1271.50000000, 47.79999924, 1.0);
- else MoveObject(gates5, -2686.19995117, 1271.50000000, 56.29999924, 6.5);
- return;
- }
- forward Gates6Check(playerid);
- public Gates6Check(playerid)
- {
- new gates6_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -2695.39990234, 1270.59997559, 56.20000076))gates6_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates6_status)MoveObject(gates6, -2695.39990234, 1270.59997559, 46.59999847, 1.0);
- else MoveObject(gates6, -2695.39990234, 1270.59997559, 56.20000076, 6.5);
- return;
- }
- forward Gates7Check(playerid);
- public Gates7Check(playerid)
- {
- new gates7_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -1674.90002441, 548.09997559, 38.90000153))gates7_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates7_status)MoveObject(gates7, -1674.90002441, 548.09997559, 34.90000153, 0.5);
- else MoveObject(gates7, -1674.90002441, 548.09997559, 38.90000153, 6.5);
- return;
- }
- forward Gates8Check(playerid);
- public Gates8Check(playerid)
- {
- new gates8_status;
- for(new all = 0;all<MAX_PLAYERS;all++)
- {
- if(!IsPlayerConnected(all)) continue;
- if(IsPlayerInRangeOfPoint(all,10.0, -1658.19995117, 545.09997559, 38.90000153))gates8_status=1;
- {
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid,0xFFFAAA,"You Have paid for toll.");
- }
- }
- if(gates8_status)MoveObject(gates8, -1658.19995117, 545.09997559, 34.40000153, 0.5);
- else MoveObject(gates8, -1658.19995117, 545.09997559, 38.90000153, 6.5);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement