Hey,
Seit dem der Timer in /motor drin ist , kann nur ID 0 den Motor Anmachen,
if(strcmp(cmd, "/motor",true) == 0)
{
if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}Fahrräder haben {FF0000}keinen{FFFFFF} Motor!");
return 1;
}
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);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~Ausgeschaltet!", 2000, 5);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du startest den Motor des Fahrzeuges...");
SetTimer("MotorTimer", 3000, false);
}
}
return 1;
}
public MotorTimer(playerid){
new vid = GetPlayerVehicleID(playerid),lights,alarm,doors,bonnet,boot,objective;
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~Gestartet!", 2000, 5);
}
Kann mir bitte jemand Helfen?