Ich habe ein problem ich habe mier gestern eine map gebaut jetzt möchte ich gerne die gates dienich gebaut habe zum wewegen bringen nur irgendwie funktionirt das nicht ich glaube da ist ein feler drinne
Script:#include <a_samp>
#pragma tabsize 0
new PlainGate1;
new PlainGate2;
new EntranceGate;
new CarsGate;
public OnFilterScriptInit()
{
CreateObject(976, 1284.217651, -2056.032715, 57.916977, 0.0000, 0.0000, 90.0001);
CreateObject(976, 1284.215698, -2056.383057, 57.916779, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1284.029663, -2042.913452, 59.636566, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1284.027100, -2034.030884, 59.597603, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1284.020264, -2025.171143, 59.558987, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1284.047729, -2016.297607, 59.518398, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1284.057495, -2007.415527, 59.478760, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1279.587524, -2003.060913, 59.611500, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1270.735229, -2003.162964, 59.899776, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1262.014893, -2003.458740, 60.188957, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1253.300781, -2003.543091, 60.472298, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1244.455566, -2003.720215, 60.742077, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1235.809814, -2001.546875, 61.193726, 0.0000, 0.0000, 337.5000);
CreateObject(975, 1227.377563, -2000.027710, 63.817383, 0.0000, 0.0000, 11.2500);
CreateObject(975, 1219.837891, -2001.059448, 66.676353, 0.0000, 0.0000, 11.2500);
CreateObject(975, 1213.003174, -2001.553833, 69.771484, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1203.794678, -2001.237183, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1194.960815, -2001.189697, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1186.310669, -2001.272705, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1177.672363, -2001.223999, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1168.953003, -2001.274414, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1160.308350, -2001.198364, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1151.564209, -2001.266846, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1142.768921, -2001.254395, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1138.367554, -1996.837891, 69.682503, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1133.984009, -1993.013306, 69.603523, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1125.099487, -1993.107910, 69.655487, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1116.278198, -1993.122559, 69.661713, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1107.979126, -1993.143921, 69.670830, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1103.753662, -1997.451782, 69.682503, 0.0000, 0.0000, 90.0000);
CreateObject(975, 1103.682129, -2006.305054, 69.682503, 0.0000, 0.0000, 90.0000);
CreateObject(975, 1103.684692, -2015.116699, 69.682503, 0.0000, 0.0000, 90.0000);
CreateObject(975, 1103.621338, -2019.427612, 69.682503, 0.0000, 0.0000, 90.0000);
CreateObject(975, 1099.049561, -2023.882690, 69.682503, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1099.479248, -2049.823486, 69.165016, 0.0000, 0.0000, 0.0000);
CreateObject(975, 1103.634399, -2054.452148, 69.666367, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1103.633667, -2063.225830, 69.665855, 0.0000, 0.0000, 270.0000);
CreateObject(975, 1103.554199, -2072.011719, 69.605782, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1103.816406, -2080.806885, 68.169724, 0.0000, 0.0000, 90.0000);
CreateObject(976, 1112.467407, -2080.799316, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1129.659424, -2080.810791, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1128.472290, -2080.996338, 68.182571, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1121.324707, -2080.985596, 68.175171, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1137.138062, -2072.300537, 68.169724, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1146.127686, -2072.321045, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1154.730103, -2070.692383, 68.169724, 0.0000, 0.0000, 191.2500);
CreateObject(976, 1163.475220, -2070.659912, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1172.324829, -2070.695068, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1181.052856, -2070.761475, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1189.832275, -2070.746826, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1198.496094, -2070.716797, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1207.399048, -2070.808350, 68.169724, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1214.913208, -2074.347168, 67.852776, 0.0000, 0.0000, 157.5000);
CreateObject(976, 1222.181030, -2074.515869, 64.645218, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1215.005737, -2074.346191, 68.224068, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1222.421875, -2074.718506, 64.521118, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1231.233276, -2074.888916, 61.211250, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1231.493042, -2074.951904, 61.123127, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1240.417480, -2075.726807, 59.055305, 0.0000, 0.0000, 180.0000);
CreateObject(976, 1240.484497, -2075.524658, 59.062843, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1248.946899, -2075.600342, 58.386440, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1258.049316, -2076.087891, 57.386032, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1266.851563, -2076.004395, 57.424606, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1275.656982, -2075.931885, 57.478867, 0.0000, 0.0000, 45.0000);
CreateObject(976, 1279.221069, -2072.296631, 58.046768, 0.0000, 0.0000, 56.2500);
SetTimer("isPlayerInArea",1000, 1);
return 0;
}
forward isPlayerInArea();
forward EntranceGateclose();
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (X <= 3034.7905 && X >= 3001.4209 && Y <= -890.00 && Y >= -935.00)
{
MoveObject(PlainGate1, 1103.753662, -1997.451782, 69.682503, 0.0000, 0.0000, 90.0000);
MoveObject(PlainGate2, 1103.682129, -2006.305054, 69.682503, 0.0000, 0.0000, 90.0000);
}
else
{
MoveObject(PlainGate1, 1103.684692, -2015.116699, 69.682503, 0.0000, 0.0000, 90.0000);
MoveObject(PlainGate2, 1103.621338, -2019.427612, 69.682503, 0.0000, 0.0000, 90.0000);
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/go", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
MoveObject(EntranceGate, 1284.217651, -2056.032715, 57.916977, 0.0000, 0.0000, 90.0001);
SendClientMessage(playerid, 0xFF0000AA, "Gate offen,du hast 9 sekunden.");
SetTimer("EntranceGateclose", 9000, true);
}
else
{
return SendClientMessage(playerid,0xFF0000AA,"Du bist nicht als rcon admin Eingelogt.");
}
return 1;
}
if(strcmp("/go2", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
MoveObject(CarsGate, 1999.029663, -2042.913452, 59.636566, 0.0000, 0.0000, 270.0000);
SendClientMessage(playerid, 0xAAAAAAAA, "Gate Offen.");
}
else
{
return SendClientMessage(playerid,0xFF0000AA,"Du bist nicht als Rcon admin Eingelogt.");
}
return 1;
}
if(strcmp("/gc2", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
MoveObject(CarsGate, 1999.027100, -2034.030884, 59.597603, 0.0000, 0.0000, 270.0000);
SendClientMessage(playerid, 0xAAAAAAAA, "Gate Geschlossen.");
}
else
{
return SendClientMessage(playerid,0xFF0000AA,"Du bist nicht als Rcon Admin Eingelogt.");
}
return 1;
}
return 0;
}
public EntranceGateclose()
{
MoveObject(EntranceGate, 1103.621338, -2019.427612, 69.682503, 0.0000, 0.0000, 90.0000);
return 1;
}
Die kordinaten von den ganzen gates:
CreateObject(976, 1284.217651, -2056.032715, 57.916977, 0.0000, 0.0000, 90.0001); das beweglihe gate 1 zu!
CreateObject(976, 1284.215698, -2056.383057, 57.916779, 0.0000, 0.0000, 270.0000); das bewigliche gate 1 auf
CreateObject(975, 1284.029663, -2042.913452, 59.636566, 0.0000, 0.0000, 270.0000); das bewegliche gat 2 zu
CreateObject(975, 1284.027100, -2034.030884, 59.597603, 0.0000, 0.0000, 270.0000); das bewegliche gat 2 auf
Ich hoffe das das einer in bewegung bekommt Die andren kordinaten stehen ja oben drinne in dem quelltext so hätten sie nicht mehr reingepasst