InTeGraLL. Posted April 19, 2017 Posted April 19, 2017 (edited) Salut, Astazi v-am pregatit un tutorial cum sa faceti un sistem de rent vehicle, O sa il gasiti aici cu tot cu explicati. https://pastebin.com/HyMhy16P Acest sistem a fost creat de mine 100% si a fost pus in gamemode-ul meu inceput de la 0. Edited April 19, 2017 by InTeGraLL. Quote
Prodan Posted April 19, 2017 Posted April 19, 2017 (edited) Adaugă respectivul cod într-un pastebin sau între tag-urile "[ code ] [ / code ]" Edited April 19, 2017 by Alliance JALCOgalben Quote
Kingsley Posted April 20, 2017 Posted April 20, 2017 Simplu, frumos imi place. Atata am de obiectat: Puteai folosii PVar - iti usura mai mult munca. De ce ai facut aici asa: new string[128]; string = "Sultan\nNRG-500\nComet\nSandking\nFlash"; ShowPlayerDialog(playerid, DIALOG_RENTVEH1, DIALOG_STYLE_LIST, "Rent Vehicle", string, "Select", "Exit"); Cand puteai face asa direct, mult mai simplu si mai optimizand si gamemode-ul (mai multe string-uri ca alea la tine in gamemode si parca vezi ce tickrate nasol o sa ai) ShowPlayerDialog(playerid, DIALOG_RENTVEH1, DIALOG_STYLE_LIST, "Rent Vehicle", "Sultan\nNRG-500\nComet\nSandking\nFlash", "Select", "Exit"); Si acel switch putea fi aranjat mai interesant: new veh; new vehName[16]; new string[128]; switch(listitem) { case 0: veh = 560, vehName = "Sultan"; case 1: veh = 522, vehName = "NRG-500"; case 2: veh = 480, vehName = "Comet"; case 3: veh = 495, vehName = "Sandking"; case 4: veh = 565, vehName = "Flash"; } format(string, sizeof(string), "Ai inchiriat un vehicul de tip %s!", vehName); SendClientMessage(playerid, COLOR_YELLOW, string); RentedCar[playerid] = 1; RentCar[playerid] = AddStaticVehicle(veh, 1062.3953, -1763.7389, 12.9339, -89.4600, 3, 3); PutPlayerInVehicle(playerid, RentCar[playerid], 0); Quote
InTeGraLL. Posted April 20, 2017 Author Posted April 20, 2017 (edited) Simplu, frumos imi place. Atata am de obiectat: Puteai folosii PVar - iti usura mai mult munca. De ce ai facut aici asa: new string[128]; string = "Sultan\nNRG-500\nComet\nSandking\nFlash"; ShowPlayerDialog(playerid, DIALOG_RENTVEH1, DIALOG_STYLE_LIST, "Rent Vehicle", string, "Select", "Exit"); Cand puteai face asa direct, mult mai simplu si mai optimizand si gamemode-ul (mai multe string-uri ca alea la tine in gamemode si parca vezi ce tickrate nasol o sa ai) ShowPlayerDialog(playerid, DIALOG_RENTVEH1, DIALOG_STYLE_LIST, "Rent Vehicle", "Sultan\nNRG-500\nComet\nSandking\nFlash", "Select", "Exit"); Si acel switch putea fi aranjat mai interesant: new veh; new vehName[16]; new string[128]; switch(listitem) { case 0: veh = 560, vehName = "Sultan"; case 1: veh = 522, vehName = "NRG-500"; case 2: veh = 480, vehName = "Comet"; case 3: veh = 495, vehName = "Sandking"; case 4: veh = 565, vehName = "Flash"; } format(string, sizeof(string), "Ai inchiriat un vehicul de tip %s!", vehName); SendClientMessage(playerid, COLOR_YELLOW, string); RentedCar[playerid] = 1; RentCar[playerid] = AddStaticVehicle(veh, 1062.3953, -1763.7389, 12.9339, -89.4600, 3, 3); PutPlayerInVehicle(playerid, RentCar[playerid], 0); Chiar nu mi-a venit in cap sa fac asa :) Multumesc de sfat, asa invat :D Edited April 20, 2017 by InTeGraLL. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.