29.06.2018, 14:44
Quote:
Alright, thanks a lot I think that will do instead. When I'm going to use OnDialogResponse, the process is the same?
Each case corresponds to an item of the array? |
PHP код:
new vehList[][] = {
{"{FFFFFF}BMX"},
};
PHP код:
new vehList[][] = {
//model, price, name
{481, 500, "{FFFFFF}BMX"},
{593, 125000, "{FFFFFF}Dodo"},
{587, 25000, "{FFFFFF}Euros"}
};
PHP код:
public OnDialogResponse(...)
{
...
case DIALOG_VEHICLES:
{
new modelid = vehList[listitem][0];
new price = vehList[listitem][1];
new modelName[32];
format(modelName, sizeof(modelName), vehList[listitem][2]);
... // deal with the rest
}
...
}