[FAST-HELP] PRESSING ENTER TO BYPASS LOGIN DIALOG
#1

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!
Reply
#2

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)
Reply
#3

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

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
Reply
#5

THANKS ^
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)