Jump to content

Recommended Posts

Posted (edited)

Adaugă respectivul cod într-un pastebin sau între tag-urile "[ code ] [ / code ]"

Edited by Alliance JALCOgalben
Posted

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); 
Posted (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 by InTeGraLL.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

moduri samp