SA-MP Forums Archive
please help again :) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: please help again :) (/showthread.php?tid=271808)



please help again :) - Rafa - 26.07.2011

why this dialog cant show me
pawn Код:
CMD:tune(playerid, params[])
{
    new playerVehicle = GetPlayerVehicleID(playerid);
    if(playerVehicle == 560 || playerVehicle == 562)
    {
        ShowPlayerDialog(playerid, tunecar, DIALOG_STYLE_LIST, "Car Tune Menu", "Nitro\nExhaust\nSideskirt\nWheels\nSpoilers\nRoof\nBumper", "Attach", "Cancel");
        return 1;
    }
    return 1;
}
pawn Код:
case tunecar:
        {
            if(!response)
            {
                SendClientMessage(playerid, COLOR_ORANGE, "You cancelled.");
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    ShowPlayerDialog(playerid, Nitro, DIALOG_STYLE_LIST, "Nitro", "2 times Nitro\n5 times Nitro\n10 times Nitro", "Attach", "Cancel");
                }
                case 1:
                {
                    ShowPlayerDialog(playerid, Exhaust, DIALOG_STYLE_LIST, "Exhaust", "Alien\nX-Flow", "Attach", "Cancel");
                }
                case 2:
                {
                    ShowPlayerDialog(playerid, Sideskirt, DIALOG_STYLE_LIST, "Sideskirt", "Left X-Flow Sideskirt\nRight X-Flow Sideskirt", "Attach", "Cancel");
                }
                case 3:
                {
                    ShowPlayerDialog(playerid, Wheels, DIALOG_STYLE_LIST, "Wheels", "Shadow\nMega\nClassic\nCutter\nGrove\nImport\nDollar\nTwist\nTrance\nAtomic", "Attach", "Cancel");
                }
                case 4:
                {
                    ShowPlayerDialog(playerid, Spoliers, DIALOG_STYLE_LIST, "Spoliers", "X-Flow\nAlien", "Attach", "Cancel");
                }
                case 5:
                {
                    ShowPlayerDialog(playerid, Roof, DIALOG_STYLE_LIST, "Roof", "Alien Roof Vent\nX-Flow Roof Vent", "Attach", "Cancel");
                }
                case 6:
                {
                    ShowPlayerDialog(playerid, Bumper, DIALOG_STYLE_LIST, "Bumper", "X-Flow\nAlien", "Attach", "Cancel");
                }
            }
        }
Thanks xD


Re: please help again :) - CJ101 - 26.07.2011

try replacing 'tunecar' with a actual number.


Re: please help again :) - Rafa - 26.07.2011

btw i have ne every dialog another dialog for the vehicle components maybe its for that .. ? :/
ill try with replacing


Re: please help again :) - Rafa - 26.07.2011

nope that doesn't work with a actual number :/


Re: please help again :) - =WoR=Varth - 26.07.2011

pawn Код:
CMD:tune(playerid, params[])
{
    new playerVehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
    if(playerVehicle == 560 || playerVehicle == 562)
    {
        ShowPlayerDialog(playerid, tunecar, DIALOG_STYLE_LIST, "Car Tune Menu", "Nitro\nExhaust\nSideskirt\nWheels\nSpoilers\nRoof\nBumper", "Attach", "Cancel");
        return 1;
    }
    else SendClientMessage(playerid,0,"Called");
    return 1;
}



Re: please help again :) - Rafa - 26.07.2011

sorry fixed i just make it like this
pawn Код:
CMD:tune(playerid, params[])
{
    new playerVehicle = GetVehicleModel(560 || 562);
    if(playerVehicle == 560 || playerVehicle == 562)
    {
        ShowPlayerDialog(playerid, tunecar, DIALOG_STYLE_LIST, "Car Tune Menu", "Nitro\nExhaust\nSideskirt\nWheels\nSpoilers\nRoof\nBumper", "Attach", "Cancel");
        return 1;
    }
    return 1;
}
btw realy thanks


Re: please help again :) - =WoR=Varth - 26.07.2011

I don't your code is works or not but you may take a look at here:
https://sampwiki.blast.hk/wiki/GetVehicleModel

You're welcome