if(strcmp(cmdtext, "/carlock", true) == 0)
{
if(GetPlayerVehicleSeat(playerid) == 0)
{
if(GetPVarInt(playerid,"Auto1")>=0)
{
new car = GetPVarInt(playerid,"AutoauswahlID");
if(GetVehicleModel(car) == 509 || GetVehicleModel(car) == 481 || GetVehicleModel(car) == 510)
{
return 1;
}
else if (Lock[car] == false)
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
GameTextForPlayer(playerid,"~w~Auto ~r~geschlossen!",3000,3);
Lock[car] = true;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
GameTextForPlayer(playerid,"~w~Auto ~g~geoeffnet!",3000,3);
Lock[car] = false;
}
}
}
return 1;
}
Hallo ich habe folgendes Problem,
Nur wenn ich abfrage ob er der Autofahrer ist, wird das auto geschlossen. Wenn ich die Frage aus weg macht, funktioniert es nicht mehr:o