stock StartMotor(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in keinem Fahrzeug, um den Motor zu starten!");
if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0x9B0000FF, "Nur der Fahrer kann den Motor starten!");
new car = GetPlayerVehicleID(playerid),m = GetVehicleModel(car);
if(m == 509 || m == 481 || m == 510) return SendClientMessage(playerid, 0x9B0000FF, "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);
Motor[car] = true;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen den Zündschlüssel, und schalten den Motor {36D61A}an!");
return 1;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Motor[car] = false;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen den Zündschlüssel, und schalten den Motor {E83A3D}aus!");
return 1;
}
return 1;
}
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in keinem Fahrzeug, um den Motor zu starten!");
if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0x9B0000FF, "Nur der Fahrer kann den Motor starten!");
new car = GetPlayerVehicleID(playerid),m = GetVehicleModel(car);
if(m == 509 || m == 481 || m == 510) return SendClientMessage(playerid, 0x9B0000FF, "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);
Motor[car] = true;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen den Zündschlüssel, und schalten den Motor {36D61A}an!");
return 1;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
Motor[car] = false;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen den Zündschlüssel, und schalten den Motor {E83A3D}aus!");
return 1;
}
return 1;
}
stock LichtAn(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in keinem Fahrzeug, um das Licht einzuschalten!");
if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0x9B0000FF, "Nur der Fahrer kann das Licht einschalten!");
new car = GetPlayerVehicleID(playerid),m = GetVehicleModel(car);
printf("playerid: %d / Vehicle: %d / Model: %d", playerid, car, m);
if(m == 417 || 425 || m == 447 || m == 464 || m == 465 || m == 469 || m == 487 || m == 488 || m == 497 || m == 501 || m == 548 || m == 563 || m == 430 || m == 446 || m == 452 || m == 453 || m == 454 || m == 472 || m == 473 || m == 484 || m == 493 || m == 595 ||
m == 460 || m == 476 || m == 511 || m == 512 || m == 513 || m == 519 || m == 520 || m == 553 || m == 577 || m == 592 || m == 593) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in einem Fahrzeug,Boot,Flugzeug, welches kein Licht hat!");
if (Licht[car] == false)
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
Licht[car] = true;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen am Schalter, und schalten das Licht {36D61A}an!");
return 1;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
Licht[car] = false;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen am Schalter, und schalten das Licht {E83A3D}aus!");
return 1;
}
return 1;
}
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in keinem Fahrzeug, um das Licht einzuschalten!");
if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, 0x9B0000FF, "Nur der Fahrer kann das Licht einschalten!");
new car = GetPlayerVehicleID(playerid),m = GetVehicleModel(car);
printf("playerid: %d / Vehicle: %d / Model: %d", playerid, car, m);
if(m == 417 || 425 || m == 447 || m == 464 || m == 465 || m == 469 || m == 487 || m == 488 || m == 497 || m == 501 || m == 548 || m == 563 || m == 430 || m == 446 || m == 452 || m == 453 || m == 454 || m == 472 || m == 473 || m == 484 || m == 493 || m == 595 ||
m == 460 || m == 476 || m == 511 || m == 512 || m == 513 || m == 519 || m == 520 || m == 553 || m == 577 || m == 592 || m == 593) return SendClientMessage(playerid, 0x9B0000FF, "Du sitzt in einem Fahrzeug,Boot,Flugzeug, welches kein Licht hat!");
if (Licht[car] == false)
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
Licht[car] = true;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen am Schalter, und schalten das Licht {36D61A}an!");
return 1;
}
else
{
GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(car,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
Licht[car] = false;
SendClientMessage(playerid, 0x4B94FFFF, "{1AADD6}Gedanke: {F2F2F2}Sie drehen am Schalter, und schalten das Licht {E83A3D}aus!");
return 1;
}
return 1;
}
Versuche es so. Wenn es nicht geht, poste was beim Licht einschalten im Server Log steht.