SA-MP Forums Archive
[FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG (/showthread.php?tid=523580)



[FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - [Cali]ChrOnic_T - 02.07.2014

I get about 30-50 players daily. now theres a jack-ass going around hacking players accounts by pressing enter 2 times to login . I tried putting it in OnPlayerKeyStateChange, so when a player press ENTER it opens the login dialog, but it failed. now i need Help.

But On Old Admin systems such as LuxAdmin and Ladmin4v2, They didnt have these problems I looked in there KeyStateChange and OnPlayerText and OnCommandRecieved and Its NOTHING! How do they block players from bypassing the dialogs as OF now I use J.LAdmin, I CANT Change admin systems because its filled with players accounts and scores and stats. Please help. I need to fix this REALLY!



Re: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - sammp - 02.07.2014

This should be in the scripting help section, but:

Script a feature to check if the user has typed anything, this can easily be done by doing:

if(strlen(inputtext) == 0)


Re: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - [Cali]ChrOnic_T - 02.07.2014

^ WHERE TO PUT THAT AT? IN THE LOGIN DIALOG OR ONPLAYERTEXT?


Re: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - Whitetiger - 02.07.2014

you can press F6 to open the chat even if a dialog is open (thus allowing you to press the "Spawn" button). return 0 in OnPlayerRequestSpawn until they're logged in.

if that's not your problem then you need to do what sammp is saying and re-show the login dialog if the password is incorrect/empty


Re: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - [Cali]ChrOnic_T - 02.07.2014

THANKS ^


Re: [FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG - sammp - 02.07.2014

You should have a knowledgeable scripter if your server has 50 players daily. Just saying.


Example of what I'm talking about:
pawn Код:
case DIALOG_LOGIN:
            {
                if(strlen(inputtext) != 0)
                {
                    // login code
                }
                else return SendClientMessage(playerid, -1, "Please type something!");
            }
oops indentation fucked up, sarry