dialog shortcut
#1

PHP код:
for(new 10001015i++)
{
if(
dialogid == i)
{
if(
response)
{
if(
listitem == 0)
ShowPlayerDialog(playerid,DIALOG_VEHICLES,DIALOG_STYLE_LIST,"{FFFFFF}Vehicle Menu","{F5F50A}VIP Vehicles\n{FFFFFF}Airplanes\nHelicopters\nBikes\nConvertibles\nIndustrial\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nTrailers\nUnique Vehicles\nRC Vehicles\n","Select","Cancel");
}
}
return 
1;

I wishes to make a shortcut for "Cancel" key to get you back the main dialog.
There is a way to make this really work ingame?
If someone could fix it I'll be thankful with a rep!

Regards, rakinz.
Reply
#2

Some tips:

1. Indent your code
2. Try to avoid using magic numbers or explain them

Anyways, just make a function like this:

PHP код:
showVehicleMainDialog(playerid)
{
    
ShowPlayerDialog(playerid, ......);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)