01.01.2010, 14:54
At OnPlayerRequestClass
At OnDialogResponse
99999 it's the password correct
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");
}
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;
}
}
}
}