Samp PoliceSkins
#1

Hey,

in my script i created this:

Код:
new PoliceSkins[] =
{
280,281,282,283,284,288,300,301,302,306,307,309,310,311
};
and i call it in a dialog like

Код:
CMD:skins(playerid) {
		new string[128];
        for (new i = 0; i < sizeof(PoliceSkins); i++) {
            format(string, sizeof string, "%s%i\tID: %i\n", string, PoliceSkins[i], PoliceSkins[i]);
        }

    return ShowPlayerDialog(playerid, DIALOG_POLIZEISKINS, DIALOG_STYLE_PREVIEW_MODEL, "Polizei Skins", string, "Auswaehlen", "Abbrechen");
}

But how can i get the skin id in

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Reply
#2

Код:
    if(dialogid == DIALOG_POLIZEISKINS)
    {
        if(response) // If they clicked 'Yes' or pressed enter
        {
            SetPlayerSkin(playerid, PoliceSkins[listitem]);
		}
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
Reply
#3

PoliceSkins[listitem] should return the skin id.
Reply
#4

thanks it worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)