Vehicle Menu -
MouizGhouri - 29.05.2015
~Fixed~
Re: Vehicle Menu -
rappy93 - 29.05.2015
I think this is what you need.
https://sampwiki.blast.hk/wiki/TextDrawSetPreviewModel
Re: Vehicle Menu -
MouizGhouri - 29.05.2015
Is there any tutorial or posted a filter script about it
AW: Vehicle Menu -
Kaliber - 29.05.2015
Maybe look at this Include:
https://sampforum.blast.hk/showthread.php?tid=407045
Greekz
Re: Vehicle Menu -
Gammix - 29.05.2015
Why not try this include:
https://sampforum.blast.hk/showthread.php?tid=570213
Just in case you want labels with the models, try the dialogs2.inc and see the example(description label version); meant for vehicle spawning.
Re: Vehicle Menu -
MouizGhouri - 29.05.2015
Still I don't understand
Re: Vehicle Menu -
Gammix - 29.05.2015
Just a simple example using my
dialogs include.
First make an array with all the vehicles you want to display in your list. For example:
pawn Код:
new vehicles_array[] =
{
400,401,402,403,404,405,406
};
Now for showing the list you have prepared, lets use a simple function ShowPlayerDialog.
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PREVMODEL, "Vehicles list", vehicles_array, "Spawn", "Cancel");
You may note that, we use a new dialog style
DIALOG_STYLE_PREVMODEL which is only possible with the include and in
info[] params, we put our declared array,
vehicles_array.
Using this code, the player will be able to see a dialog with the specified vehicles with their model displayed.
Now for handling the response of dialog. You have to use
OnDialogResponse.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)//the dialogid
{
if(response)//if player pressed 'SPAWN'
{
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
new vehicleid = CreateVehicle(strval(inputtext), pos[0], pos[1], pos[2], pos[3], random(255), random(255), -1);
SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
PutPlayerInVehicle(playerid, vehicleid, 0);
}
}
return 1;
}
No whenever the player presses 'Spawn' or Button1(response = 1), the dialog will hide just as normal dialogs do and as we handle the response, a vehicle will be created with the model selected and the player will be put as driver.
Re: Vehicle Menu -
MouizGhouri - 29.05.2015
Is there any filterscript released on samp forum
Re: Vehicle Menu -
rappy93 - 29.05.2015
The guy above just explained exactly what you have to do. If you want someone else to make your script for you then you're posting in the wrong section.
Re: Vehicle Menu -
MouizGhouri - 29.05.2015
Okay thanks I will do it