How to password protect a skin
#2

At OnPlayerRequestClass

pawn Code:
if(classid == YOURSKIN)
{
   ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !\nType down the correct password to choose it !,"OK","Cancel");
}
At OnDialogResponse

pawn Code:
if(response)
{
  switch(dialogid)
  {
     case 1:
     {
       if(strval(inputtext) == 99999)
       {
           SendClientMessage(playerid,COLOR_WHITE,"Correct Password. Skin taken.");
           SetPlayerSkin(playerid,YOURSKIN);
           TogglePlayerControllable(playerid,true);
           TogglePlayerSpectating(playerid,0);
           SetCameraBehindPlayer(playerid);
           SpawnPlayer(playerid);
        }
        else
        {
           SendClientMessage(playerid,COLOR_GREY,"Invalid Password !");
           return 1;
        }
     }
   }
}
99999 it's the password correct
Reply


Messages In This Thread
How to password protect a skin - by JoeDaDude - 01.01.2010, 14:49
Re: How to password protect a skin - by MJ! - 01.01.2010, 14:54
Re: How to password protect a skin - by Mike Garber - 01.01.2010, 14:57
Re: How to password protect a skin - by JoeDaDude - 01.01.2010, 15:15
Re: How to password protect a skin - by MJ! - 01.01.2010, 15:27
Re: How to password protect a skin - by JoeDaDude - 01.01.2010, 15:37
Re: How to password protect a skin - by _Vortex - 01.01.2010, 16:10
Re: How to password protect a skin - by MerLow - 01.01.2010, 16:14
Re: How to password protect a skin - by JoeDaDude - 01.01.2010, 17:02

Forum Jump:


Users browsing this thread: 2 Guest(s)