11.06.2012, 19:04
How can i make this car, list all the cars in the dealership system in a dialog?
Thanks
Код:
dcmd_playerscars(playerid, params[]) { new giveplayerid; if(sscanf(params, "d", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /playerscars [playerid]"); new playername[24]; GetPlayerName(giveplayerid, playername, sizeof(playername)); new info[256], bool:found; for(new i=1; i < MAX_DVEHICLES; i++) { if(VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], playername) == 0) { found = true; format(info, sizeof(info), "%sID: %d Name: %s\n", info, i, VehicleNames[VehicleModel[i]-400]); } } if(!found) return SendClientMessage(playerid, COLOR_RED, "He don't have any vehicles!"); ShowPlayerDialog(playerid, DIALOG_FINDVEHICLE, DIALOG_STYLE_LIST, "Find his car", info, "Find", "Cancel"); return 1; }