Hallo Leute
Ich habe in der letzten Zeit an einen Zollsystem rumgebastelt.
Doch leider öffnet sich das Tor nicht wenn ich /zoll eingebe. Das Geld und so wird bei dem Befehl abgezogen aber die Tore lassen ich einfach nicht öffnen.
Bitte dringend um Hilfe.
Hier ist auch noch mal das ganze Script wär Net wenn jemand weiß was daran falsch ist. Beim Compilen wird zumindest kein Fehler gefunden.
#include <a_samp>
//==========DEFINITION==========//
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#pragma tabsize 0
//==========GATE CLOSE==========//
forward GateCloseZoll1();
forward GateCloseZoll2();
forward GateCloseZoll3();
forward GateCloseZoll4();
forward GateCloseZoll5();
forward GateCloseZoll6();
forward GateCloseZoll7();
forward GateCloseZoll8();
//==========CREATE GATES==========//
new zoll1;
new zoll2;
new zoll3;
new zoll4;
new zoll5;
new zoll6;
new zoll7;
new zoll8;
//==========OBJECTE==========//
public OnFilterScriptInit()
{
print("\n========================================");
print("=======|San Andreas Zollstationen|========");
print("========================================\n");
CreateObject(9623,-1398.29980469,826.89941406,49.00000000,0.00000000,0.00000000,315.99426270); //zoellnerhaeuschen
CreateObject(7522,1699.09997559,410.00000000,34.00000000,0.00000000,0.00000000,341.99993896); //object(vgnhsegate1) (1)
CreateObject(4100,1688.00000000,413.79998779,31.29999924,0.00000000,0.00000000,32.00000000); //object(meshfence1_lan) (1)
CreateObject(4100,1710.40002441,406.79998779,31.00000000,0.00000000,0.00000000,31.99768066); //object(meshfence1_lan) (2)
CreateObject(13562,1698.69995117,410.00000000,38.40000153,0.00000000,0.00000000,0.00000000); //object(bigsprunkpole) (1)
CreateObject(3578,1710.90002441,395.50000000,30.29999924,0.00000000,0.00000000,296.00000000); //object(dockbarr1_la) (2)
CreateObject(3578,1717.59997559,414.50000000,30.70000076,0.00000000,0.00000000,199.99914551); //object(dockbarr1_la) (3)
CreateObject(3578,1687.19995117,424.70001221,30.60000038,0.00000000,0.00000000,117.99508667); //object(dockbarr1_la) (4)
CreateObject(3578,1681.00000000,405.10000610,30.29999924,0.00000000,0.00000000,27.99316406); //object(dockbarr1_la) (5)
CreateObject(1423,53.09999847,-1543.30004883,4.90000010,0.00000000,0.00000000,264.00000000); //object(dyn_roadbarrier_4) (1)
CreateObject(1423,44.79999924,-1542.19995117,4.90000010,0.00000000,0.00000000,263.99597168); //object(dyn_roadbarrier_4) (2)
CreateObject(1423,48.09999847,-1520.09997559,4.80000019,0.00000000,0.00000000,263.99597168); //object(dyn_roadbarrier_4) (3)
CreateObject(1423,55.90000153,-1521.19995117,4.80000019,0.00000000,0.00000000,263.99597168); //object(dyn_roadbarrier_4) (4)
CreateObject(9623,50.50000000,-1531.89941406,7.00000000,0.00000000,0.00000000,261.99645996); //zoellnerhaeuschen456
CreateObject(3578,-1412.00000000,834.90002441,47.20000076,0.00000000,0.00000000,316.00000000); //object(dockbarr1_la) (6)
CreateObject(3578,-1406.59997559,840.59997559,47.20000076,0.00000000,0.00000000,315.99975586); //object(dockbarr1_la) (7)
CreateObject(3578,-1385.50000000,819.70001221,47.20000076,0.00000000,0.00000000,315.99975586); //object(dockbarr1_la) (8)
CreateObject(3578,-1390.69995117,814.20001221,47.20000076,0.00000000,0.00000000,315.99975586); //object(dockbarr1_la) (9)
CreateObject(7033,-2681.50000000,1763.89941406,71.59999847,0.00000000,0.00000000,0.00000000); //object(vgnhsegate02) (1)
CreateObject(1412,-2697.10009766,1757.09997559,68.50000000,0.00000000,0.00000000,0.00000000); //object(dyn_mesh_2) (1)
CreateObject(1412,-2697.10009766,1770.40002441,68.50000000,0.00000000,0.00000000,0.00000000); //object(dyn_mesh_2) (2)
CreateObject(1412,-2665.89990234,1770.30004883,68.50000000,0.00000000,0.00000000,0.00000000); //object(dyn_mesh_2) (3)
CreateObject(1412,-2665.89990234,1758.09997559,68.50000000,0.00000000,0.00000000,0.00000000); //object(dyn_mesh_2) (4)
CreateObject(4100,-2693.19995117,1764.00000000,68.80000305,0.00000000,0.00000000,50.00000000); //object(meshfence1_lan) (3)
CreateObject(671,55.00000000,-1543.00000000,4.09999990,0.00000000,0.00000000,0.00000000); //object(sm_bushytree) (1)
CreateObject(671,58.40000153,-1521.80004883,4.09999990,0.00000000,0.00000000,0.00000000); //object(sm_bushytree) (2)
CreateObject(671,43.59999847,-1541.90002441,4.19999981,0.00000000,0.00000000,0.00000000); //object(sm_bushytree) (3)
CreateObject(671,47.00000000,-1520.19995117,4.09999990,0.00000000,0.00000000,0.00000000); //object(sm_bushytree) (4)
CreateObject(647,1708.90002441,397.60000610,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (2)
CreateObject(647,1709.69995117,395.60000610,31.20000076,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (3)
CreateObject(647,1711.09997559,393.10000610,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (4)
CreateObject(647,1712.19995117,390.89999390,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (5)
CreateObject(647,1714.00000000,413.70001221,32.00000000,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (6)
CreateObject(647,1715.50000000,414.60000610,31.60000038,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (7)
CreateObject(647,1717.09997559,415.29998779,31.70000076,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (8)
CreateObject(647,1719.00000000,416.29998779,31.89999962,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (9)
CreateObject(647,1720.80004883,417.00000000,31.89999962,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (10)
CreateObject(647,1689.59997559,422.10000610,31.60000038,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (11)
CreateObject(647,1689.00000000,424.29998779,31.60000038,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (12)
CreateObject(647,1688.19995117,426.10000610,31.70000076,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (13)
CreateObject(647,1687.40002441,427.79998779,31.70000076,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (14)
CreateObject(647,1686.59997559,428.89999390,31.79999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (15)
CreateObject(647,1684.09997559,405.89999390,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (16)
CreateObject(647,1682.69995117,404.89999390,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (17)
CreateObject(647,1680.90002441,403.60000610,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (18)
CreateObject(647,1678.30004883,402.29998779,31.29999924,0.00000000,0.00000000,0.00000000); //object(new_bushsm) (19)
CreateObject(759,1709.09997559,401.60000610,29.50000000,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (1)
CreateObject(759,1710.00000000,404.00000000,29.60000038,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (2)
CreateObject(759,1710.90002441,406.39999390,29.60000038,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (3)
CreateObject(759,1712.40002441,410.50000000,29.70000076,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (4)
CreateObject(759,1711.69995117,408.20001221,29.70000076,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (5)
CreateObject(759,1686.59997559,409.50000000,29.60000038,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (6)
CreateObject(759,1687.50000000,412.20001221,29.60000038,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (7)
CreateObject(759,1689.69995117,418.50000000,29.70000076,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (8)
CreateObject(759,1689.30004883,416.10000610,29.70000076,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (9)
CreateObject(759,1688.59997559,414.29998779,29.60000038,0.00000000,0.00000000,0.00000000); //object(sm_bush_large_1) (10)
CreateObject(4100,-2669.79980469,1764.29980469,68.80000305,0.00000000,0.00000000,49.99877930); //object(meshfence1_lan) (5)
CreateObject(703,-2665.80004883,1758.19995117,67.50000000,0.00000000,0.00000000,0.00000000); //object(sm_veg_tree7_big) (1)
CreateObject(703,-2697.19995117,1756.40002441,67.50000000,0.00000000,0.00000000,0.00000000); //object(sm_veg_tree7_big) (2)
CreateObject(703,-2696.30004883,1769.00000000,67.50000000,0.00000000,0.00000000,0.00000000); //object(sm_veg_tree7_big) (3)
CreateObject(703,-2665.19995117,1769.40002441,67.50000000,0.00000000,0.00000000,0.00000000); //object(sm_veg_tree7_big) (4)
CreateObject(14469,-1409.80004883,831.00000000,47.20000076,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (1)
CreateObject(14469,-1411.30004883,833.29998779,47.20000076,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (2)
CreateObject(14469,-1413.00000000,834.90002441,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (3)
CreateObject(14469,-1414.80004883,836.70001221,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (4)
CreateObject(14469,-1394.00000000,816.50000000,47.20000076,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (5)
CreateObject(14469,-1393.19995117,815.59997559,47.20000076,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (6)
CreateObject(14469,-1391.50000000,812.90002441,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (7)
CreateObject(14469,-1389.59997559,811.09997559,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (8)
CreateObject(14469,-1387.59997559,822.50000000,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (9)
CreateObject(14469,-1386.00000000,821.00000000,47.29999924,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (10)
CreateObject(14469,-1384.30004883,819.40002441,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (11)
CreateObject(14469,-1382.90002441,817.90002441,47.59999847,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (12)
CreateObject(14469,-1409.09997559,844.09997559,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (13)
CreateObject(14469,-1407.09997559,842.20001221,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (14)
CreateObject(14469,-1405.40002441,841.00000000,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (15)
CreateObject(14469,-1404.09997559,838.90002441,47.59999847,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (16)
CreateObject(14469,-1403.09997559,837.79998779,47.70000076,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (17)
CreateObject(14469,-1388.00000000,822.90002441,47.40000153,0.00000000,0.00000000,0.00000000); //object(flower-bush08a) (18)
zoll1 = CreateObject(980,-2675.50000000,1763.19921875,69.90000153,0.00000000,0.00000000,359.98901367); //zoll-1-
zoll2 = CreateObject(980,-2687.50000000,1763.29980469,69.90000153,0.00000000,0.00000000,359.99450684); //zoll-2-
zoll3 = CreateObject(969,-1398.19921875,826.00000000,46.59999847,0.00000000,0.00000000,315.99975586); //zoll-3-
zoll4 = CreateObject(969,-1399.89941406,827.69921875,46.59999847,0.00000000,0.00000000,135.99426270); //zoll-4-
zoll5 = CreateObject(980,1693.19921875,411.39941406,32.40000153,0.00000000,0.00000000,339.99938965); //zoll-5-
zoll6 = CreateObject(980,1704.50000000,407.19921875,32.40000153,0.00000000,0.00000000,339.99938965); //zoll-6-
zoll7 = CreateObject(969,48.00000000,-1532.19995117,4.59999990,0.00000000,0.00000000,261.99645996); //zoll-7-
zoll8 = CreateObject(969,48.29999924,-1529.90002441,4.59999990,0.00000000,0.00000000,81.99645996); //zoll-8-
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/Zoll", true) == 0)
{
if (IsPlayerInRangeOfPoint(playerid,7.0, 1740.2059,509.7868,28.4849))//Zoll -1- /1/==|Funktioniert|==
{
MoveObject(zoll1,-2675.50000000,1763.19921875,69.90000153, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 1)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll1", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, -1318.7848,919.0928,46.0326))//Zoll -4- /1/==|Funktioniert|==
{
MoveObject(zoll2,-2687.50000000,1763.29980469,69.90000153, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 1)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll2", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, -1314.2152,909.7383,46.0889))//Zoll -4- /2/==|Funktioniert|==
{
MoveObject(zoll3,-1398.19921875,826.00000000,46.59999847, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 2)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll3", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, 62.9513,-1326.6962,4.7878))//Zoll -5- /1/==|Funktioniert|==
{
MoveObject(zoll4,-1399.89941406,827.69921875,46.59999847, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 2)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll4", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, 62.9513,-1326.6962,4.7878))//Zoll -5- /2/==|Funktioniert|==
{
MoveObject(zoll5,1693.19921875,411.39941406,32.40000153, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 3)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll5", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, 51.6079,-1527.1141,4.9502))//Zoll -6- /1/==|Funktioniert|==
{
MoveObject(zoll6,1704.50000000,407.19921875,32.40000153, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 3)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll6", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, 46.9073,-1535.6595,5.0433))//Zoll -6- /2/==|Funktioniert|==
{
MoveObject(zoll7,48.00000000,-1532.19995117,4.59999990, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 4)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll7", 3000, 5);
}
else if (IsPlayerInRangeOfPoint(playerid, 7.0, -69.0040,-887.6051,15.3098))//Zoll -7- /1/==|Funktioniert|==
{
MoveObject(zoll8,48.29999924,-1529.90002441,4.59999990, 4.0);
SendClientMessage(playerid, COLOR_GREEN, "[Zöllner]:Gute Weiterfahrt(Zollstation 4)");
GameTextForPlayer(playerid, "~g~Mautgebuehr: ~r~-1o0$", 5000, 1);
GivePlayerMoney(playerid, -100);
SetTimer("GateCloseZoll8", 3000, 5);
}
else
{
SendClientMessage(playerid, COLOR_RED,"Sie Sind an keiner Zoll Station");
return 1;
}
return 1;
}
return 0;
}
public GateCloseZoll1()
{
MoveObject(zoll1,-2675.50000000,1763.19921875,69.90000153,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll2()//Zoll -1- /2/
{
MoveObject(zoll2,-2687.50000000,1763.29980469,69.90000153,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll3()//Zoll -2- /1/
{
MoveObject(zoll3,-1398.19921875,826.00000000,46.59999847,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll4()//Zoll -2- /2/
{
MoveObject(zoll4,-1399.89941406,827.69921875,46.59999847,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll5()//Zoll -3- /1/
{
MoveObject(zoll5,1693.19921875,411.39941406,32.40000153,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll6()//Zoll -3- /2/
{
MoveObject(zoll6,1704.50000000,407.19921875,32.40000153,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll7()//Zoll -4- /1/
{
MoveObject(zoll7,48.00000000,-1532.19995117,4.59999990,4.0);//===|Ausgangsposition|===//
return 1;
}
public GateCloseZoll8()//Zoll -4- /2/
{
MoveObject(zoll8,48.29999924,-1529.90002441,4.59999990,4.0);//===|Ausgangsposition|===//
return 1;
}
#endif