Posts: 673
Threads: 169
Joined: Apr 2008
Reputation:
0
Hello,
Im making an admin skin, Everyone can see it,
But if they press shift when its selected,
It asks for a password, If the password is right, It spawns them with the skin as normal,
If its wrong, It dosent let them use it,
How would i do that properly? Ive tried several ways but havent succeeded
Posts: 1,506
Threads: 69
Joined: Feb 2008
Quote:
Originally Posted by Щә яә Ґя
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
|
He would post in the Script Request thread If he wanted full codes.
You should just have explained how to do It, not give him the code.
Well, might not be a rule, but It'll help him to figure things out himself, and help him to become a scripter faster
rather then just a script kiddie who copy & paste everything.
Posts: 213
Threads: 40
Joined: Nov 2009
Reputation:
0
err , i forgot to close the string ...
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Sk in","This skin requers a password !\nType down the correct password to choose it !","OK","Cancel");