23.03.2016, 09:21
Code under OnDialogResponse:
Note: Im not showing all the vehicles,im showing the vehicles which the player owns.
PHP код:
if(dialogid == 558)
{
if(response)
{
new str[250], str2[250], count;
for(new i = 0; i < MAX_RP_VEHICLES; i++)
{
count++;
if(VehicleInfo[i][KeyHolder] == CharacterInfo[playerid][active_character[playerid]][cID])
{
format(str2, sizeof(str2), "%s (%d)\n", VehicleInfo[i][vModel], VehicleInfo[i][vID]);
strcat(str, str2);
}
}
ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, ""COL_GREEN"JRP - Vehicle Keys", str, "Select", "");
}
}
if(dialogid == 559)
{
if(response)
{
}
}
Note: Im not showing all the vehicles,im showing the vehicles which the player owns.