if(strcmp("/carsell", cmdtext, true, 10) == 0)
{
if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
GivePlayerMoney(playerid, PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2);
Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 0;
Dtc_UnLockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
DestroyDynamicObject(sirene[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]]);
sirenean[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = false;
DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,Dtc_PlayerKey[playerid]);
fremove(string3);
Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] = 0;
SendClientMessage(playerid, COLOR_YELLOW, " Fahrzeug erfolgreich verkauft, Hälfte des Kaufpreises wird wurde dir wieder gegeben!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug!");
return 1;
}
return 1;
}
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,1196.0211,-1351.2733,13.4017) || IsPlayerInRangeOfPoint(playerid,4.0,1547.5663,-1610.0396,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))
{
if(IsPlayerInRangeOfPoint(playerid,4.0,-1407.8838,507.2498,18.2344) || IsPlayerInRangeOfPoint(playerid,4.0,-1234.6599,473.8205,7.1875))
{
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 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 an keinem /rep-Punkt!");
}
else SendClientMessage(playerid,COLOR_RED," Du bist nicht berechtigt, dein Fahrzeug auf Kosten des Staats zu reparieren!");
return 1;
}
//edit: Die Coords von Rep habe ich selber gemacht, musst halt dementsprechend anpassen!