Bitte um Hilfe also wenn man /opark eingibt als Ordnungsbeamter ist das Auto weg !
Es ist nicht mehr da.Wenn man /findcar macht wird es an einen Bauernhof angezeigt aber dort findet man auch nix.
Laso bitte diesmal um eine Antwort
hier ist der Code von dem /opark command:
if (strcmp("/opark", cmd, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 525 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pMember] == 24||PlayerInfo[playerid][pLeader] == 24)
{
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GREY, " An deinem Abschleppwagen ist kein Auto angehängt!");
return 1;
}
new trailercar = GetVehicleTrailer(GetPlayerVehicleID(playerid));
if(!IsADtCar(trailercar)) {
SendClientMessage(playerid, COLOR_GREY, "Du kannst keine Fraktions Cars etc abschleppen!");
return 1;
}
//new trailercar = GetVehicleTrailer(GetPlayerVehicleID(playerid));
new Float:X,Float:Y,Float:Z;
new Float:z_rot;
GetVehiclePos(trailercar, X,Y,Z);
GetVehicleZAngle(trailercar, z_rot);
new carowner = GetDtCarOwner(trailercar);
new slot = GetDtCarOwnerSlot(carowner,trailercar);
PlayerCar[carowner][slot][CarPos_x] = X;
PlayerCar[carowner][slot][CarPos_y] = Y;
PlayerCar[carowner][slot][CarPos_z] = Z;
PlayerCar[carowner][slot][CarArrest] = 1;
PlayerCar[carowner][slot][CarRotate] = z_rot;
new fkasse = 2000 + random(2999);
FraktionsKasse[23] += fkasse;
if(carowner != 555)
{
OnPlayerCarUpdate(carowner);
SendClientMessage(carowner, COLOR_WHITE, " Ihr Fahrzeug wurde abgeschleppt setzen sie sich mit dem Ordnungsamt mit \"/service ordnungsamt\" in verbindung!");
PlayerInfo[carowner][pRest] = 1;
SetTimerEx("PlayerCarSpawn",1000,0,"i",carowner);
}
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_YELLOW, " Du hast das Fahrzeug erfolgreich abgeschleppt!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Mitglied des Ordnungsamtes!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du musst einen Abschleppwagen fahren!");
}
return 1;
}
/Opark problem
- attimen
- Geschlossen
- Erledigt
-
-
zeig mal das:
public OnPlayerCarUpdate
und
public PlayerCarSpawnPS: täusche ich mich jetzt,oder kam diese Frage mit opark nicht schon 100000 mal in den letzten Tagen?
-
zeig mal das:
public OnPlayerCarUpdate
und
public PlayerCarSpawnPS: täusche ich mich jetzt,oder kam diese Frage mit opark nicht schon 100000 mal in den letzten Tagen?
Nein tust du nicht da nie jemand mir geantwortet hat.
Und PlayerCarSpawn und OnPlayerCarUpdate gibt es öfters welche möchtes du den sehen?+
//edit oops doch gefunden
Function OnPlayerCarUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
for(new x = 0; x < MaxVeh; x++)
{
if(Dtc_PlayerHaveCar[playerid][x])
{
DestroyVehicle(PlayerCar[playerid][x][CarId]);
Dtc_Carlock[PlayerCar[playerid][x][CarId]] = 0;
Dtc_LockCar(PlayerCar[playerid][x][CarId]);
new string3[128];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,x);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "CarId=%d\n",PlayerCar[playerid][x][CarId]);fwrite(hFile, var);
format(var, 32, "CarModel=%d\n",PlayerCar[playerid][x][CarModel]);fwrite(hFile, var);
format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][x][CarPos_x]);fwrite(hFile, var);
format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][x][CarPos_y]);fwrite(hFile, var);
format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][x][CarPos_z]);fwrite(hFile, var);
format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][x][CarRotate]);fwrite(hFile, var);
format(var, 32, "CarNitro=%d\n",PlayerCar[playerid][x][CarNitro]);fwrite(hFile, var);
format(var, 32, "CarHyd=%d\n",PlayerCar[playerid][x][CarHyd]);fwrite(hFile, var);
format(var, 32, "CarWheel=%d\n",PlayerCar[playerid][x][CarWheel]);fwrite(hFile, var);
format(var, 32, "CarAusp=%d\n",PlayerCar[playerid][x][CarAusp]);fwrite(hFile, var);
format(var, 32, "CarSideL=%d\n",PlayerCar[playerid][x][CarSideL]);fwrite(hFile, var);
format(var, 32, "CarSideR=%d\n",PlayerCar[playerid][x][CarSideR]);fwrite(hFile, var);
format(var, 32, "CarFB=%d\n",PlayerCar[playerid][x][CarFB]);fwrite(hFile, var);
format(var, 32, "CarRB=%d\n",PlayerCar[playerid][x][CarRB]);fwrite(hFile, var);
format(var, 32, "CarSpoiler=%d\n",PlayerCar[playerid][x][CarSpoiler]);fwrite(hFile, var);
format(var, 32, "CarRoof=%d\n",PlayerCar[playerid][x][CarRoof]);fwrite(hFile, var);
format(var, 32, "CarHood=%d\n",PlayerCar[playerid][x][CarHood]);fwrite(hFile, var);
format(var, 32, "CarVents=%d\n",PlayerCar[playerid][x][CarVents]);fwrite(hFile, var);
format(var, 32, "CarLamps=%d\n",PlayerCar[playerid][x][CarLamps]);fwrite(hFile, var);
format(var, 32, "CarPJ=%d\n",PlayerCar[playerid][x][CarPJ]);fwrite(hFile, var);
format(var, 32, "CarC1=%d\n",PlayerCar[playerid][x][CarC1]);fwrite(hFile, var);
format(var, 32, "CarC2=%d\n",PlayerCar[playerid][x][CarC2]);fwrite(hFile, var);
format(var, 32, "Plate=%s\n",PlayerCar[playerid][x][Plate]);fwrite(hFile, var);
fclose(hFile);
}
}
}
}
}
und
Function PlayerCarSpawn(playerid,Slot)
{
if(IsPlayerConnected(playerid))
{
if(Dtc_PlayerHaveCar[playerid][Slot])
{
PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]);
if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);}
if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);}
if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);}
if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);}
if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);}
if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);}
if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);}
if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);}
if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);}
if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);}
if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);}
if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);}
if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);}
if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);}
if(Dtc_LockOnSpawn)
{
Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1;
Dtc_LockCar(PlayerCar[playerid][Slot][CarId]);
}
new strings[15];
new name[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, name, sizeof name);
format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
//format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
for(new x = 0; x < MaxVeh; x++)
{
PlayerCar[playerid][x][Plate] = strings;
}
}
} -
breadfish.de
Hat das Thema geschlossen.