30.03.2016, 08:02
You can realize this. You have to put in the password MyPassword but you can change this.
PHP код:
//global
new PasswordClass[9];
//OnGameModeInit:
PasswordClass[0] = AddPlayerClass(280,1577.9375,-1627.9703,13.3828,88.5506,0,0,0,0,0,0); //
PasswordClass[1] = AddPlayerClass(281,1577.9375,-1627.9703,13.3828,88.5506,0,0,0,0,0,0); //
PasswordClass[2] = AddPlayerClass(282,1577.9375,-1627.9703,13.3828,88.5506,0,0,0,0,0,0); //
PasswordClass[3] = AddPlayerClass(283,1577.9375,-1627.9703,13.3828,88.5506,0,0,0,0,0,0); //
PasswordClass[4] = AddPlayerClass(284,1577.9375,-1627.9703,13.3828,88.5506,0,0,0,0,0,0); //
PasswordClass[5] = AddPlayerClass(285,1547.4600,-1640.0782,28.4021,89.8322,0,0,0,0,0,0); // SniperMan
PasswordClass[6] = AddPlayerClass(286,1572.1573,-1611.5800,13.3828,87.7506,0,0,0,0,0,0); //
PasswordClass[7] = AddPlayerClass(287,1588.4423,-1636.9617,13.4149,0.4094,0,0,0,0,0,0); // Admin
PasswordClass[8] = AddPlayerClass(288,1573.5120,-1635.6119,13.5481,42.6945,0,0,0,0,0,0); //
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","");
break;
}
}
return 1;
}
if(dialogid == DIALOG_SKINPW)
{
if(response)
{
if(!strcmp(inputtext,"MyPassword",true))
{
SpawnPlayer(playerid);
}
}
return 1;
}