Not showing dialog.
#1

So I'm making a /vstorage CMD for a server i'm helping with, and when I try to make it show the dialog, it isn't showing it. Here's the code.
Код:
CMD:vstorage(playerid, params[])
{
	new vstring[1024];
	for(new i, iModelID; i < MAX_PLAYERVEHICLES; i++) {
		if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0) {
			if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
				format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[iModelID]);
			}
			else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
				format(vstring, sizeof(vstring), "%s\n%s (disabled)", vstring, VehicleName[iModelID]);
			}
			else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
				format(vstring, sizeof(vstring), "%s\n%s (stored)", vstring, VehicleName[iModelID]);
			}
			else format(vstring, sizeof(vstring), "%s\n%s (spawned)", vstring, VehicleName[iModelID]);
		}
		else strcat(vstring, "\nEmpty");
	}
	ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "Vehicle storage", vstring, "(De)spawn", "Cancel");
	return 1;
}
Please help, thanks.
Reply
#2

pawn Код:
CMD:vstorage(playerid, params[])
{
    new vstring[1024];
    for(new i, iModelID; i != MAX_PLAYERVEHICLES; ++i) {
        if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0) {
            strcat(vstring, VehicleName[iModelID]);
           
            if(PlayerVehicleInfo[playerid][i][pvImpounded]) strcat(vstring, " (impounded)\n");
            else if(PlayerVehicleInfo[playerid][i][pvDisabled]) strcat(vstring, " (disabled)\n");
            else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) strcat(vstring, " (stored)\n");
            else strcat(vstring, " (spawned)\n");
        }
        else strcat(vstring, "\nEmpty");
    }
    ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "Vehicle storage", vstring, "(De)spawn", "Cancel");
    return 1;
}
I've little changed your code. The reasony why the dialog isn't called however isn't visible. Where do you define VSTORAGE? If VSTORAGE is alright, no idea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)