Tach Community,
Ich habe hier ein Problem...
Und zwar bastel ich zurzeit ein Motorscript für meinen Server.
Hier mal der Code:
#include <a_samp>
//Defines etc.
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEEN 0x00FF0000
new engine,lights,alarm,doors,bonnet,boot,objective;
new bool:Motor[MAX_VEHICLES]=false;
//Code:
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Motor-FS by ExTAsY loaded (v1.0 Beta) ");
print("--------------------------------------\n");
return 1;
}
for (new i=0; i< MAX_VEHICLES; i++)
{
GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(i,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Motor[i] = false;
}
public OnVehicleSpawn(vehicleid)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Motor[vehicleid] = false;
return 1;
}
if(strcmp(cmdtext, "/engine", true) == 0)
{
if(GetPlayerVehicleSeat(playerid) == 0)
{
new car = GetPlayerVehicleID(playerid);
if(GetVehicleModel(car) == 509 || GetVehicleModel(car) == 481 || GetVehicleModel(car) == 510)
{
SendClientMessage(playerid, COLOR_RED, "Du sitzt auf einem Fahrrad. Das hat keinen Motor!");
}
else if (Motor[car] == false)
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COLOR_GREEN, "Der Motor wurde erfolgreich gestartet!");
Motor[car] = true;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COLOR_GREEN, "Du hast den Motor gestoppt!);
Motor[car] = false;
}
}
return 1;
}
if(GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
Das Script hat das Problem, dass wenn ich es kompiliere, eine Fehlermeldung bekomme die Heist "Pawn Compiler Libary funktioniert nichtmehr".
Woran liegt das (nutze 0.3D)
MfG
ExTAsY