27.10.2016, 16:29
Quote:
try this
Код HTML:
forward VehicleTow(playerid); public VehicleTow(playerid) { new TowString[200]; if(!cache_num_rows()) return SendClientError(playerid,"You do not have any vehicles."); for(new i=0; i<cache_get_row_count(); i++) { new carid = cache_get_field_content_int(i,"id"); strcat(TowString,sprintf("%s(%i)\n",GetVehicleName(Vehicle[carid][vModel]),Vehicle[carid][vModel])); } ShowPlayerDialog(playerid,91141,DIALOG_STYLE_LIST,sprintf("%s's vehicles.",Name(playerid)),TowString,"Tow","Cancel"); return 1; } |
Update i fixed it.
"Vehicle[carid][vModel]" best.
I searched for the vModel instead of the carid itself.
oops..
But now i got this new issue.
PHP код:
switch(dialogid)
{
case 91141:
{
SendMessage(playerid,-1,sprintf("%i",listitem));
if(IsVehicleOccupied(listitem)) return SendClientError(playerid,"That vehicle is occupied.");
ReloadVehicle(listitem);
SendClientNotice(playerid,"That car has succesfully been towed.");
}
}