Guten Mittag,
ich hab probleme mit dem /engine befehl da der motor nicht starten will
hir der code:
if(strcmp(cmdtext, "/engine", true)==0) {
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new vid = GetPlayerVehicleID(playerid),KNAME[MAX_PLAYER_NAME];
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
GetPlayerName(playerid, KNAME, MAX_PLAYER_NAME);
if(vid != INVALID_VEHICLE_ID) {
if(engine == VEHICLE_PARAMS_ON) {
StopEngine(playerid,vid);
SendClientMessage(playerid,COLOR_GRAD2," Motor abgeschaltet.");
return 1;
} else if(engine == VEHICLE_PARAMS_OFF) {
if(Maske[playerid] == 0) {
format(string, sizeof(string), "* %s startet den Motor",KNAME);
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
} else if(Maske[playerid] == 1) {
SetPlayerChatBubble(playerid, "* Jemand startet einen Motor", COLOR_PURPLE, 30.0, 2000); SetTimerEx("StartEngineSleep",800,0,"i",playerid);
}
SendClientMessage(playerid,COLOR_GRAD2," Motor wird gestartet.");
SetTimerEx("StartEngineSleep",1300,0,"i",playerid); SendClientMessage(playerid,COLOR_GRAD2," Motor wird gestartet.");
return 1;
}
}
return 1;
}