Hallo Com.
Habe eine frage
Wie kann ich ein auto mit der taste 2 starten?
if(strcmp(cmd, "/motor", true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(vid != INVALID_VEHICLE_ID)
{
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Motor ausgeschaltet");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Du startest den Motor");
SetTimerEx("motoran",1000,0, "i", playerid);
}
}
return 1;
}