31.03.2016, 09:31
Only the skins who should have the password need the array PasswordClass[..] before the function AddPlayerClass. Not all skins!
Also you should write OnPlayerRequestClass like this:
So when you choose a skin who needn't a password the dialog will hide.
Also you should write OnPlayerRequestClass like this:
PHP код:
public OnPlayerRequestClass(playerid,classid)
{
for(new i;i<sizeof(PasswordClass);i++)
{
if(classid == PasswordClass[i])
{
ShowPlayerDialog(playerid,DIALOG_SKINPW,DIALOG_STYLE_INPUT,"Password","Put in the password for the skin","Next","");
return 1;
}
}
ShowPlayerDialog(playerid,-1,DIALOG_STYLE_INPUT," "," "," "," ");
return 1;
}