SA-MP Forums Archive
Vehicle Dialog - 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: Vehicle Dialog (/showthread.php?tid=343464)



Vehicle Dialog - System12 - 17.05.2012

I need vehicle dialog, for /v park /v coolor /v fix /v lock /v repaint /v locate /v sell... i need this command in dialog please help my, and i need /moveleader for moving leader if is he(she) offline please please help me I need this


Re: Vehicle Dialog - dannyk0ed - 17.05.2012

Do you have a vehicle saving system? Like pCarkey?


Re: Vehicle Dialog - System12 - 17.05.2012

Quote:
Originally Posted by dannyk0ed
View Post
Do you have a vehicle saving system? Like pCarkey?
Yes I have


Re: Vehicle Dialog - Kirollos - 17.05.2012

You should do like the following:

pawn Code:
CMD:v(playerid, params[])
{
    #pragma unused params
   
    ShowPlayerDialog(playerid, 1509, DIALOG_STYLE_LIST, "Vehicle System List!", "1.Park\n2.Repaint\n3.Change Colour\n4.Fix Vehicle\n5.Lock Car\n6.Locate your vehicle\n7.Sell Your Vehicle", "Select", "Cancel"); // You can change the dialogid to anything. you can also add options to the Dialog List.
    SendClientMessage(playerid, 0xEE0000FF, "Select one option from the following in this Dialog!");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1509) // change 1509 to the dialogid of the /v command :D
    {
        if(!response) return SendClientMessage(playerid, 0xEE0000FF, "ERROR: You cancelled the /v !");
        switch(listitem)
        {
            case 0: // First Item
            {
                //You things here
            }
            case 1: // Second Item
            {
                //Your Things here
            }
            //etc..
        }
    }
}



Re: Vehicle Dialog - System12 - 17.05.2012

Quote:
Originally Posted by kirollos
View Post
You should do like the following:

pawn Code:
CMD:v(playerid, params[])
{
    #pragma unused params
   
    ShowPlayerDialog(playerid, 1509, DIALOG_STYLE_LIST, "Vehicle System List!", "1.Park\n2.Repaint\n3.Change Colour\n4.Fix Vehicle\n5.Lock Car\n6.Locate your vehicle\n7.Sell Your Vehicle", "Select", "Cancel"); // You can change the dialogid to anything. you can also add options to the Dialog List.
    SendClientMessage(playerid, 0xEE0000FF, "Select one option from the following in this Dialog!");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1509) // change 1509 to the dialogid of the /v command :D
    {
        if(!response) return SendClientMessage(playerid, 0xEE0000FF, "ERROR: You cancelled the /v !");
        switch(listitem)
        {
            case 0: // First Item
            {
                //You things here
            }
            case 1: // Second Item
            {
                //Your Things here
            }
            //etc..
        }
    }
}
Tnxxx


Re: Vehicle Dialog - FalconX - 17.05.2012

Quote:
Originally Posted by System12
View Post
Tnxxx
There is no use of using:-

pawn Code:
#pragma unused params
Remove it, it's just useless to use this with ZCMD because if the params are not used they never return a warning saying that params are not used, it happens in DCMD so remove it

-FalconX


Re: Vehicle Dialog - System12 - 18.05.2012

Quote:
Originally Posted by FalconX
View Post
There is no use of using:-

pawn Code:
#pragma unused params
Remove it, it's just useless to use this with ZCMD because if the params are not used they never return a warning saying that params are not used, it happens in DCMD so remove it

-FalconX
I known that, but tnx