enum DATA_CAR { file, u, id, c_, c2_, Float:x, Float:y, Float:z, Float:a }; new Approppriately[DATA_CAR];
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case callCarsDialog: if(response) { ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel"); return 1; } case 2: if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 3, input, "Cars GUI","\nType a id of a vehicle to create and save\n\n", "Confirm", "Back"); return 1; } else if(listitem == 1) { ShowPlayerDialog(playerid, 4, input, "Cars GUI","\nType the id of File to delete the car.\n\n", "Confirm", "Back"); return 1; } else if(listitem == 2) { ShowPlayerDialog(playerid, 7, list, "Cars GUI - COLORS", "\nColor 1\nColor 2\n\n", "Confirm", "Back"); return 1; } else if(listitem == 3) { ShowPlayerDialog(playerid, 10, input, "Cars GUI - X", "\nType the id File to teleport.\n\n", "Confirm", "Back"); return 1; } else if(listitem == 4) { ShowPlayerDialog(playerid, 13, input, "Cars GUI - Spawn", "\nType the id File to respawn\n\n", "Confirm", "Cancel"); return 1; } } case 3: if(response) { if(IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid, 2, list, "ERROR, ALREADY IN A VEHICLE", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
GetPlayerPos(playerid, Approppriately[x], Approppriately[y], Approppriately[z]); GetPlayerFacingAngle(playerid, Approppriately[a]); new cc_ = strval(inputtext); SetTimerEx("wii_CreateCars", 5000, false, "ddffff", playerid, cc_, Approppriately[x], Approppriately[y], Approppriately[z], Approppriately[a]); format(Global, 60, "(WAIT 5 SECONDS) - File car created, id of car: %d", cc_); ShowPlayerDialog(playerid, 6, msgbox, "Sucessful", Global, "Continue", "Back"); TogglePlayerControllable(playerid, 0); SetPlayerPos(playerid, Approppriately[x]+2, Approppriately[y], Approppriately[z]); return 1; } else ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 4: if(response) { new cc_ = strval(inputtext); format(Global, 30, "Cars/%d.ini", cc_); if(!INI_Exist(Global)) return ShowPlayerDialog(playerid, 5, msgbox, "ERROR", "The id from File car doesn't exist, try again.\n\n", "Try", "Cancel"); INI_Remove(Global); format(Global, 45, "File car id[%d] deleted with successful!", cc_); ShowPlayerDialog(playerid, 5, msgbox, "Cars GUI", Global, "Delete other", "Cancel"); DestroyVehicle(cc_); return 1; } else ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 5: if(response) { ShowPlayerDialog(playerid, 4, input, "Cars GUI","\nType the ID File for delete the car\n\n", "Confirm", "Back"); return 1; } else ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 6: if(!response) return ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 7: if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 8, input, "COR 1", "\nType the id of File car\n\n", "Confirm", "Cancel"); return 1; } else if(listitem == 2) { ShowPlayerDialog(playerid, 9, input, "COR 2", "\nType the id of File car\n\n", "Confirm", "Cancel"); return 1; } } else ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 8: if(response) { Approppriately[id] = strval(inputtext); format(Global, 30, "Cars/%d.ini", Approppriately[id]); if(!INI_Exist(Global)) return ShowPlayerDialog(playerid, 2, list, "ERROR, INVALID ID", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
ShowPlayerDialog(playerid, 11, input, "COR 1", "\nType the value of color 1 ( 0 - 128 )\n\n", "Confirm", "Cancel"); return 1; } case 9: if(response) { Approppriately[id] = strval(inputtext); format(Global, 30, "Cars/%d.ini", Approppriately[id]); if(!INI_Exist(Global)) return ShowPlayerDialog(playerid, 2, list, "ERROR, INVALID ID", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
ShowPlayerDialog(playerid, 12, input, "COR 2", "\nType the value of color 2 ( 0 - 128 )\n\n", "Confirm", "Cancel"); return 1; } case 10: if(response) { Approppriately[id] = strval(inputtext); format(Global, 30, "Cars/%d.ini", Approppriately[id]); if(!INI_Exist(Global)) return ShowPlayerDialog(playerid, 2, list, "ERROR, INVALID ID", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
PutPlayerInVehicle(playerid, Approppriately[id], 0); ShowPlayerDialog(playerid, 2, list, "Cars GUI - Teleport successful.", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel"); return 1; } else ShowPlayerDialog(playerid, 2, list, "Cars GUI", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
case 11: if(response) { if(128 > Approppriately[c_] < 0) return ShowPlayerDialog(playerid, 2, list, "ERROR, INVALID VALUE", "\nCreate car\nDelete car\nChoose colors\nTeleport to car \"x\"\nRespawn car \"x\"\n\n", "Confirm", "Cancel");
#if defined filterScriptUser public OnFilterScriptInit() { LOAD_CAR();
print("\n--------------------------------------\n"); print("FilterScript vehicleCreator."); print("Atual update 1.0 from Jeffrey_Hatrix, thanks to Willian_Luigi"); printf("Veнculos carregados: %d", Approppriately[id]); return print("\n--------------------------------------\n"); } #else #error Run this like a FilterScript, By:Willian_Luigi #endif