Probier es mit
if(strcmp(cmd,"/rep",true) == 0)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,4) || IsPlayerInFrac(playerid,7))
{
if(IsPlayerInRangeOfPoint(playerid,4.0,796.9246,-2102.7170,12.6823) || IsPlayerInRangeOfPoint(playerid,4.0,1547.5944,-1610.1729,13.3828) || IsPlayerInRangeOfPoint(playerid,4.0,-1628.6464,652.0121,7.1875) || IsPlayerInRangeOfPoint(playerid,4.0,1244.3359,-2042.6630,59.8744) || IsPlayerInRangeOfPoint(playerid,4.0,1571.3887,-1705.3455,28.3948) || IsPlayerInRangeOfPoint(playerid,4.0,1692.5320,-1539.5343,13.5469))
{
new veh = GetPlayerVehicleID(playerid);
if(IsAnAmbulance(veh) || IsACopCar(veh) ||IsAArmyCar(veh) || IsAPraesiCar(veh))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:vehX, Float:vehY, Float:vehZ, Float:vehA;
GetVehiclePos(veh,vehX,vehY,vehZ);
GetVehicleZAngle(veh,vehA);
RemovePlayerFromVehicle(playerid);
FreezePlayer(playerid);
SetVehicleToRespawn(veh);
SetTimerEx("Rep",5000,0,"iiffff",playerid,veh,vehX,vehY,vehZ,vehA);
GameTextForPlayer(playerid,"~g~Fahrzeugreperatur~n~~y~Bitte warten...",4500,3);
}
}
}
else if(IsPlayerInRangeOfPoint(playerid,4.0,1196.0211,-1351.2733,13.4017) || IsPlayerInRangeOfPoint(playerid,4.0,-1407.8838,507.2498,18.2344) || IsPlayerInRangeOfPoint(playerid,4.0,-1234.6599,473.8205,7.1875) || IsPlayerInRangeOfPoint(playerid,4.0,1136.2015,-1342.8668,13.7693))
{
veh = GetPlayerVehicleID(playerid);
if(IsAnAmbulance(veh) || IsACopCar(veh) ||IsAArmyCar(veh) || IsAPraesiCar(veh))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:vehX, Float:vehY, Float:vehZ, Float:vehA;
GetVehiclePos(veh,vehX,vehY,vehZ);
GetVehicleZAngle(veh,vehA);
RemovePlayerFromVehicle(playerid);
FreezePlayer(playerid);
SetVehicleToRespawn(veh);
SetTimerEx("Rep",5000,0,"iiffff",playerid,veh,vehX,vehY,vehZ,vehA);
GameTextForPlayer(playerid,"~g~Fahrzeugreperatur~n~~y~Bitte warten...",4500,3);
}
else { SendClientMessage(playerid,COLOR_RED," Du bist nicht der Fahrer!"); }
}
else {SendClientMessage(playerid,COLOR_RED," Du bist in keinem Staatsfahrzeug!");}
}
else {SendClientMessage(playerid,COLOR_RED," Du bist an keinem /rep-Punkt!");}
}
else {SendClientMessage(playerid,COLOR_RED," Du bist nicht berechtigt, dein Fahrzeug auf Kosten des Staats zu reparieren!");}
return 1;
}
PS: Dass das so dämlich eingerückt ist liegt ned an mir, habs nur von dir kopierrt & Klammern eingefügt...
Erklärung: Bei sämtlichen Else-Zweigen hast du die {} vergessen. Woher soll das Programm denn wissen, wann es was ausführen soll, wenn du nichts eingrenzt?