pawn Код:
#include <a_samp>
#include <streamer>
#include <foreach>
#define red 0xFF0000AA
new toll1;
new toll2;
new toll3;
forward Tolls();
forward Timer_TollsClose(tollid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ");
print("--------------------------------------\n");
toll1 = CreateDynamicObject(3578, 1651.2354736328, -43.643432617188, 36.139217376709, 0, 0, 21.5);
CreateDynamicObject(3578, 1651.2353515625, -43.642578125, 34.464115142822, 0, 0, 21.494750976563);
CreateDynamicObject(3881, 1657.2734375, -38.7255859375, 37.266929626465, 0, 0, 20.494995117188);
CreateDynamicObject(3578, 1650.0999755859, -41.400001525879, 34.799999237061, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1649.5, -40, 34.799999237061, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1649.0999755859, -38.599998474121, 34.799999237061, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1648.6999511719, -37.599998474121, 34.799999237061, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1652.1999511719, -45.400001525879, 34.700000762939, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1652.6999511719, -46.700000762939, 34.700000762939, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1653.3000488281, -48.099998474121, 34.700000762939, 0, 0, 21.4892578125);
CreateDynamicObject(3578, 1653.9000244141, -49.5, 34.700000762939, 0, 0, 21.4892578125);
CreateDynamicObject(3881, 1645.3000488281, -48.700000762939, 37.299999237061, 0, 0, 202.99499511719);
CreateDynamicObject(638, 1658.9000244141, -33.299999237061, 36.200000762939, 0, 0, 290);
CreateDynamicObject(638, 1656.4000244141, -34.200000762939, 36.200000762939, 0, 0, 289.9951171875);
CreateDynamicObject(638, 1654.6999511719, -34.799999237061, 36.200000762939, 0, 0, 289.9951171875);
CreateDynamicObject(638, 1645.3000488281, -43.799999237061, 36.200000762939, 0, 0, 201.9951171875);
CreateDynamicObject(638, 1644.3000488281, -41.299999237061, 36.200000762939, 0, 0, 201.99462890625);
CreateDynamicObject(638, 1644, -40.5, 36.200000762939, 0, 0, 201.99462890625);
CreateDynamicObject(638, 1642.3000488281, -40.200000762939, 36.200000762939, 0, 0, 113.49465942383);
CreateDynamicObject(638, 1640, -41.200000762939, 36.200000762939, 0, 0, 113.49426269531);
CreateDynamicObject(638, 1637.6999511719, -42.200000762939, 36.200000762939, 0, 0, 113.49426269531);
CreateDynamicObject(638, 1647.9000244141, -52.5, 36.200000762939, 0, 0, 112.24462890625);
CreateDynamicObject(638, 1645.5, -53.5, 36.200000762939, 0, 0, 112.24182128906);
CreateDynamicObject(638, 1643.3000488281, -54.400001525879, 36.200000762939, 0, 0, 112.24182128906);
CreateDynamicObject(638, 1657.0999755859, -43.5, 36.200000762939, 0, 0, 199.99180603027);
CreateDynamicObject(638, 1657.9000244141, -45.700000762939, 36.200000762939, 0, 0, 199.98962402344);
CreateDynamicObject(638, 1658.4000244141, -47, 36.200000762939, 0, 0, 199.98962402344);
CreateDynamicObject(638, 1660.0999755859, -47.400001525879, 36.200000762939, 0, 0, 289.98962402344);
CreateDynamicObject(638, 1662.3000488281, -46.599998474121, 36.200000762939, 0, 0, 289.98962402344);
CreateDynamicObject(638, 1664.5, -45.799999237061, 36.200000762939, 0, 0, 289.98962402344);
CreateDynamicObject(1215, 1658.5999755859, -48.5, 35.900001525879, 0, 0, 0);
CreateDynamicObject(1215, 1649.1999511719, -52.400001525879, 35.900001525879, 0, 0, 0);
CreateDynamicObject(1215, 1643.6999511719, -39, 35.900001525879, 0, 0, 0);
CreateDynamicObject(1215, 1653.1999511719, -34.799999237061, 35.900001525879, 0, 0, 0);
CreateDynamicObject(1352, 1658.6999511719, -47.900001525879, 33.799999237061, 0, 0, 21.5);
CreateDynamicObject(1352, 1643.6999511719, -39.700000762939, 33.799999237061, 0, 0, 199.74475097656);
CreateObject(3578,1651.2353500,-43.6425800,34.4641200,0.0000000,0.0000000,21.4950000); //convertffs(1)
CreateObject(8168,612.7382800,-1191.4599600,20.2941100,0.0000000,4.9990000,318.3070000); //convertffs(36)
CreateObject(8168,620.4726600,-1188.4960900,20.0441100,0.0000000,352.9910000,138.9390000); //convertffs(37)
CreateObject(997,614.3320900,-1194.3870800,17.7093700,0.0000000,0.0000000,266.7060000); //convertffs(39)
CreateObject(973,601.0999800,-1203.0000000,18.0000000,0.0000000,0.0000000,19.8470000); //convertffs(40)
CreateObject(973,631.7999900,-1175.1999500,19.5000000,0.0000000,0.0000000,21.8300000); //convertffs(43)
CreateObject(997,619.2656300,-1181.6513700,18.7093700,0.0000000,0.0000000,268.6870000); //convertffs(44)
CreateObject(8168,61.2560400,-1533.3946500,6.1042500,0.0000000,0.0000000,9.9250000); //convertffs(46)
CreateObject(8168,40.9658200,-1529.5722700,6.1042500,0.0000000,0.0000000,188.5690000); //convertffs(47)
CreateObject(973,52.9794900,-1531.9252900,5.0904900,0.0000000,0.0000000,352.0600000); //convertffs(52)
CreateObject(973,49.0420700,-1531.5065900,5.1758700,0.0000000,0.0000000,352.0570000); //convertffs(53)
CreateObject(997,35.9033200,-1525.8710900,4.5050000,0.0000000,0.0000000,342.1250000); //convertffs(56)
CreateObject(997,63.9140800,-1535.7126500,4.0626400,0.0000000,0.0000000,342.1310000); //convertffs(57)
toll2 = CreateObject(3578,623.1992200,-1179.1992200,19.2000000,0.0000000,0.0000000,29.9990000); //gaterm kanan
CreateObject(3578,608.0999800,-1195.6999500,17.2000000,0.0000000,0.0000000,24.0000000); //object(dockbarr1_la) (2)
CreateObject(3578,625.5996100,-1183.0000000,17.5500000,0.0000000,0.0000000,25.9990000); //object(dockbarr1_la) (5)
toll3 = CreateObject(3578,609.5996100,-1199.7998000,18.1000000,0.0000000,0.0000000,24.0000000); //gaterm kiri
CreateObject(3578,605.5000000,-1191.8000500,17.8000000,0.0000000,0.0000000,24.0000000); //object(dockbarr1_la) (7)
CreateObject(3578,628.0000000,-1187.3000500,17.0000000,0.0000000,0.0000000,25.9990000); //object(dockbarr1_la) (8)
CreateObject(1352,633.2999900,-1185.8000500,16.0000000,0.0000000,358.0000000,26.0000000); //object(cj_traffic_light3) (1)
CreateObject(1352,599.7999900,-1193.0000000,17.0000000,0.0000000,0.0000000,222.0000000); //object(cj_traffic_light3) (2)
CreateObject(1215,624.7999900,-1191.3000500,18.6000000,0.0000000,0.0000000,0.0000000); //object(bollardlight) (1)
CreateObject(1215,626.7000100,-1175.0999800,19.8000000,0.0000000,0.0000000,0.0000000); //object(bollardlight) (2)
CreateObject(1215,608.7000100,-1188.6999500,19.2000000,0.0000000,0.0000000,0.0000000); //object(bollardlight) (3)
CreateObject(3578,36.4000000,-1521.8000500,5.0000000,0.0000000,0.0000000,265.9950000); //gatef kanan
CreateObject(3578,67.5000000,-1541.1999500,4.8000000,0.0000000,0.0000000,273.9940000); //gatef kiri
CreateObject(3578,63.1000000,-1541.0000000,3.4000000,0.0000000,359.0000000,261.9940000); //object(dockbarr1_la) (11)
CreateObject(3578,57.3000000,-1540.0000000,3.4000000,0.0000000,359.0000000,261.0000000); //object(dockbarr1_la) (11)
CreateObject(3578,40.8000000,-1522.8000500,3.5000000,0.0000000,0.0000000,265.9950000); //object(dockbarr1_la) (10)
CreateObject(3578,44.5000000,-1523.4000200,3.5000000,0.0000000,1.0000000,265.9950000); //object(dockbarr1_la) (10)
SetTimer("Tolls", 1500, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public Tolls()
{
foreach(Player, playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1651.2354736328, -43.643432617188, 36.139217376709))
{
MoveDynamicObject(toll1, 1651.2353515625, -43.642578125, 34.464115142822, 2.5);
GivePlayerMoney(playerid, -5);
GameTextForPlayer(playerid, "~y~WELL HELLO THERE GOOD SIR~n~THANK YOU~n~~r~$10", 3000, 3);
SetTimerEx("Timer_TollsClose",5000,false,"i", 0);
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, 623.1992200,-1179.1992200,19.2000000)) // Richman tolls kanan
{
MoveDynamicObject(toll2, 623.19921875, -1179.19921875, 18.129999160767, 2.5);
GivePlayerMoney(playerid, -50);
GameTextForPlayer(playerid, "~y~Jangan Lupa Gunakan SeatBeat atau Helmet Anda~n~THANK YOU~n~~r~$50", 3000, 3);
SetTimerEx("Timer_TollsClose",5000,false,"i", 1);
}
if(IsPlayerInRangeOfPoint(playerid, 5.0, 609.5996100, -1199.7998000, 18.1000000)) // Richman tolls kiri
{
MoveDynamicObject(toll3, 609.599609375, -1199.7998046875, 16.60000038147, 2.5);
GivePlayerMoney(playerid, -50);
GameTextForPlayer(playerid, "~y~Jangan Lupa Gunakan SeatBeat atau Helmet Anda~n~THANK YOU~n~~r~$50", 3000, 3);
SetTimerEx("Timer_TollsClose",5000,false,"i", 2);
}
}
}
public Timer_TollsClose(tollid)
{
switch(tollid)
{
case 0: MoveDynamicObject(toll1, 1651.2354736328, -43.643432617188, 36.139217376709, 2.5);
case 1: MoveDynamicObject(toll2, 623.1992200,-1179.1992200,19.2000000, 2.5); //richman kanan
case 2: MoveDynamicObject(toll3, 609.5996100, -1199.7998000, 18.1000000, 2.5); // richman kiri
}
}