Guten Mittag,
ich hab da ein Problem mit /rep
überall Funktioniert der Befehl außer nicht am Point
Brauche bissl hilfe... Hier der Befehl!
if(strcmp(cmd,"/rep",true) == 0)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,7))
{
if((playerid))
{
new veh = GetPlayerVehicleID(playerid);
if(IsAnAmbulance(veh) || IsACopCar(veh) ||IsAArmyCar(veh) || IsAPraesiCar(veh) || IsAFbiCar(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;
}
und hier die rep Pointe:
Function IsAtRep(playerid)
{
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,2668.9263,-2639.5989,2.1344) ||IsPlayerInRangeOfPoint(playerid,4.0,975.3781,-1446.9520,13.0599))
{
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,4.0,-1407.8838,507.2498,18.2344) || IsPlayerInRangeOfPoint(playerid,4.0,-1234.6599,473.8205,7.1875) || IsPlayerInRangeOfPoint(playerid, 4.0, 1692.5320,-1539.5343,13.5469) || IsPlayerInRangeOfPoint(playerid, 4.0, 1571.3887,-1705.3455,28.3948) || IsPlayerInRangeOfPoint(playerid, 4.0, 1007.9469,1154.9111,10.7402) ||IsPlayerInRangeOfPoint(playerid,4.0,2758.9431,-2393.5806,13.6328))
{
return 1;
}
return 0;
}
und ich will nur das man am Point das tun kann
Hoffe es kann einer helfen
Mfg
Hydra