Beiträge von Jayden_D
-
-
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == BuyDiag) { if(response == 1) { new price, co1, co2, mmmodel, str[50]; for(new i = 0; i<sizeof ShowCars; i++) { if(GetPlayerVehicleID(playerid) == ShowCars[i][v_id]) { price = ShowCars[i][CarPreis]; co1 = ShowCars[i][Color1]; co2 = ShowCars[i][Color2]; mmmodel = ShowCars[i][mmodel]; } } new sform[128], i = CreateNumber(), Float:rrx, Float:rry, Float:rrz, Float:rra; format(sform,sizeof sform,"/Cars/%d.ini",i); for(new k = 0; k<sizeof CarRanges; k++) { if(IsPlayerInRangeOfPoint(playerid, 50.0, CarRanges[k][0],CarRanges[k][1],CarRanges[k][2])) { rrx = CarSpawns[k][0]; rry = CarSpawns[k][1]; rrz = CarSpawns[k][2]; rra = CarSpawns[k][3]; } } if(!fexist(sform)) { if(GetPlayerMoney(playerid) > price) { if(Player[playerid][Own] < MaxCarsOwn) { GivePlayerMoney(playerid, -price); SendClientMessage(playerid, COLOR_YELLOW, "Glückwunsch zu deinem neuen Fahrzeug!"); PlayerCar[i][NS] = Create3DTextLabel("", COLOR_NS, 0.0, 0.0, 0.0, 50.0, 0, 0); PlayerCar[i][px] = rrx; PlayerCar[i][py] = rry; PlayerCar[i][pz] = rrz; PlayerCar[i][pa] = rra; PlayerCar[i][c1] = co1; PlayerCar[i][c2] = co2; PlayerCar[i][Fuel] = 100; PlayerCar[i][model] = mmmodel; PlayerCar[i][NSID] = i; Player[playerid][Own]++; PlayerCar[i][BuyPrice] = price; format(PlayerCar[i][Key], MAX_PLAYER_NAME, "%s", pn(playerid)); PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1); format(PlayerCar[i][ABC], 11, "%s", CreateABC()); format(str, sizeof str, "%s-%s-0%d", NSPraefix, PlayerCar[i][ABC], PlayerCar[i][NSID]); Update3DTextLabelText(PlayerCar[i][NS], COLOR_NS, str); Attach3DTextLabelToVehicle(PlayerCar[i][NS], PlayerCar[i][vid], 0.0, 0.0, NSHoehe); TogglePlayerControllable(playerid, 1); RemovePlayerFromVehicle(playerid); new File:f; f=fopen(sform,io_write); if(f) { fclose(f); } } else { new string[50]; format(string, sizeof string, "Du hast schon %d Fahrzeuge!", MaxCarsOwn); SendClientMessage(playerid, COLOR_GREY, string); } } else { SendClientMessage(playerid, COLOR_GREY, "Du hast nicht genug Geld!"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); } } } if(response == 0) { RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); } } return 1;}
/edit wie mach ich das untereinander , ich bin neu.
-
Ich habe ein Problem mit dem Fliterscript:
Wenn ich in ein Auto einsteige werde ich ja gefreezed und mir wird der Dialog angezeigt.
Wenn ich auf "Kaufen" oder "Abbrechen" drücke passiert nichts.
Der Dialog verschwindet und ich bleibe gefreezed.