HI! Habe ein Problem,
Wenn ich das hier eingebe
new Olicht[MAX_VEHICLES];
new light1[MAX_VEHICLES];
new light2[MAX_VEHICLES];
new light3[MAX_VEHICLES];
new light4[MAX_VEHICLES];
new light5[MAX_VEHICLES];
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 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 OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/olicht", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
{
if(Olicht[GetPlayerVehicleID(playerid)] == 0)
{
light1[GetPlayerVehicleID(playerid)] = CreateObject(19154,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
light2[GetPlayerVehicleID(playerid)] = CreateObject(19154,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
light3[GetPlayerVehicleID(playerid)] = CreateObject(19154,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
light4[GetPlayerVehicleID(playerid)] = CreateObject(19154,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
light5[GetPlayerVehicleID(playerid)] = CreateObject(19154,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
AttachObjectToVehicle(light1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.0089111328, -0.5, 1.55, 0.0, 0.0, 0.0);
AttachObjectToVehicle(light2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.5, -0.5, 1.55, 0.0, 0.0, 0.0);
AttachObjectToVehicle(light3[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.5, -0.5, 1.55, 0.0, 0.0, 0.0);
AttachObjectToVehicle(light4[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.5, 2.75, 0.6, 0.0, 0.0, 0.0);
AttachObjectToVehicle(light5[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.5, 2.75, 0.6, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid,"~r~Warnlicht Aktiviert",5000, 1);
SendClientMessage(playerid, COLOR_GREY, "Du kannst das Warnlicht mit /olicht wieder ausschalten!");
Olicht[GetPlayerVehicleID(playerid)] = 1;
}
else if(Olicht[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(light1[GetPlayerVehicleID(playerid)]);
DestroyObject(light2[GetPlayerVehicleID(playerid)]);
DestroyObject(light3[GetPlayerVehicleID(playerid)]);
DestroyObject(light4[GetPlayerVehicleID(playerid)]);
DestroyObject(light5[GetPlayerVehicleID(playerid)]);
GameTextForPlayer(playerid,"~r~Warnlicht Deaktiviert",5000, 1);
SendClientMessage(playerid, COLOR_GREY, "Du kannst das Warnlicht mit /olicht wieder anschalten!");
Olicht[GetPlayerVehicleID(playerid)] = 0;
}
}
}
return 1;
}
return 1;
}
Bekomm ich Folgende Error's:
Zeile (1) : Ungültige Array-Größe (negativ oder null)
Zeile (2) : Unbekannte Variable : "MAX_VEHICLES"
Zeile (2) : Ungültige Array-Größe (negativ oder null)
Zeile (3) : Unbekannte Variable : "MAX_VEHICLES"
Zeile (3) : Ungültige Array-Größe (negativ oder null)
Zeile (4) : Unbekannte Variable : "MAX_VEHICLES"
Zeile (4) : Ungültige Array-Größe (negativ oder null)
Zeile (5) : Unbekannte Variable : "MAX_VEHICLES"
Zeile (5) : Ungültige Array-Größe (negativ oder null)
Zeile (6) : Unbekannte Variable : "MAX_VEHICLES"
Zeile (6) : Ungültige Array-Größe (negativ oder null)
Zeile (78) : Unbekannte Variable : "COLOR_GREY"
Zeile (79) : Falsch eingerückt
Zeile (89) : Unbekannte Variable : "COLOR_GREY"
Du hast Errors im Skript. Kompilierung abgebrochen
(c) Trooper[Y]
In Kooperation mit GTA-Servers.de
Wo liegt denn hier Genau der Fehler
PS: Wie Finde ich die Koordinaten bei AttachObjectToVehicle
LG