SA-MP Forums Archive
Problem.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem.. (/showthread.php?tid=295772)



Problem.. - GeonMake - 07.11.2011

I have a dialogue in his key example for the NRG 522, 411 for Infernus, 560 for the Sultan, etc.
After you type id and press Buy it needs to create a car with my id typed, but does not work. Do you have ideas how to do? Below is the script of the dialogues.

pawn Код:
if(!strcmp(npcname, "Dealership", true))
        {
            ShowPlayerDialog(playerid, 12, DIALOG_STYLE_INPUT, "Dealership", "ID Car:", "Ok", "Close");
            PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
            return 1;
        }
pawn Код:
if(dialogid == 12)
        {
            if(response)
            {
                new model;
                CreateVehicle(model,2783.9478,-2494.4778,13.6550,85.6610,0,0, 36000);
                SendClientMessage(playerid, COLOR_GREY, "Done!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Cancel.");
            }
        }



Re: Problem.. - FireCat - 07.11.2011

pawn Код:
if(dialogid == 12)
        {
            if(response)
            {
                new model = 411;
                CreateVehicle(model,2783.9478,-2494.4778,13.6550,85.6610,0,0, 36000);
                SendClientMessage(playerid, COLOR_GREY, "Done!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Cancel.");
            }
        }
Just doing new model your assigning model to 0.
There is no car model to 0.
411 is infernus. Try it


Re: Problem.. - PowerPC603 - 07.11.2011

pawn Код:
if(dialogid == 12)
        {
            if(response)
            {
                new model = strval(inputtext);
                CreateVehicle(model,2783.9478,-2494.4778,13.6550,85.6610,0,0, 36000);
                SendClientMessage(playerid, COLOR_GREY, "Done!");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Cancel.");
            }
        }
Use this to take the value you entered as the vehicle-model.


Re: Problem.. - GeonMake - 08.11.2011

thank you goes!