Samp PoliceSkins - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Samp PoliceSkins (
/showthread.php?tid=661384)
Samp PoliceSkins -
theralio - 02.12.2018
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[])
Re: Samp PoliceSkins -
labiyebu - 02.12.2018
Код:
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.
}
Re: Samp PoliceSkins -
serqq - 02.12.2018
PoliceSkins[listitem] should return the skin id.
Re: Samp PoliceSkins -
theralio - 02.12.2018
thanks it worked