їDIALOG_STYLE_LIST? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: їDIALOG_STYLE_LIST? (
/showthread.php?tid=607650)
їDIALOG_STYLE_LIST? -
Ghost112397 - 22.05.2016
Buenas, vengo a recurrir al foro para que me den una idea para terminar el comando que estoy haciendo.
PHP код:
CMD:gps(playerid,params[])
{
new gps[128];
for(new i = 1; i < 7; i++){
if(InfoV[playerid][i][vPuedeCrearse]){
format(gps,sizeof(gps),"%s\n%s (ID: %i)",gps,GetVehicleName(InfoV[playerid][i][vModelo]),InfoV[playerid][i][vID]);
}
}
ShowPlayerDialog(playerid,DIALOG_GPS,DIALOG_STYLE_LIST,"Tus vehнculos",gps,"Localizar","Salir");
return 1;
}
Necesito una idea de como terminar este comando, ya que no se me ocurre como hacer en OnDialogResponse para la creaciуn. Desde ya muchas gracias.
Re: їDIALOG_STYLE_LIST? -
lucesita - 22.05.2016
PHP код:
public OnDialogResponse(..)
{
if (dialogid == id && response) {
new clicked_slot = listitem;
CreateVehicle(InfoV[playerid][clicked_slot][vModelo], InfoV[playerid][clicked_slot][vPos], ..);
}
}
Respuesta: їDIALOG_STYLE_LIST? -
aoEXE - 22.05.2016
Код:
new SlotItem[7];
CMD:gps(playerid,params[])
{
new gps[70*6], temp[60];
for(new i = 1; i < 7; i++){
if(InfoV[playerid][i][vPuedeCrearse]){
SlotItem[i] = InfoV[playerid][vID];
format(temp, sizeof(temp), "%s (ID: %i)\n", GetVehicleName(InfoV[playerid][i][vModelo]),InfoV[playerid][vID]);
strcat(gps, temp);
}
}
ShowPlayerDialog(playerid,DIALOG_GPS,DIALOG_STYLE_LIST,"Tus vehнculos",gps,"Localizar","Salir");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_GPS:
{
if(!response) return 0;
new Float:x,Float:y,Float:z;
GetVehiclePos(SlotItem[listitem+1], x, y, z);
return 1;
}
}
return 0;
}