Jump to content

cibu

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by cibu

  1. Hello! How can i get from mysql db the vehicles that are for the group 1? I wanna put them in the dialog (list). What i want to do is when the user uses [/sfv] to show me the vehicles for the group x. how can i do that? mp.events.addCommand('sfv', (player) => { if(player.data.playerGroup == -1) return sendMessage(player, '#32a852', `Eroare: !{#FFFFFF}Nu faci parte dintr-o factiune.`); showSFV(player, player.data.playerGroup); }); function showSFV(player, faction) { let list = []; player.selectoptions = []; let f = player.data.playerGroup; let text = `[SFV]: Faction #${f}`; for(let x = 0; x < 3; x++) { list.push(struct.sfv[x].vehID + ". " + struct.sfv[x].vehModel); player.selectoptions.push(x); } player.call(SERVER_EVENT.REQUEST_DIALOG, ["listItem", "sfv_dialog", text, "sfv dialog", list, ["Spawn", "Cancel"], ]); return 1; }
×
×
  • Create New...