SA-MP Forums Archive
Wrong Password = Kick? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Wrong Password = Kick? (/showthread.php?tid=451385)



Wrong Password = Kick? - Blackazur - 16.07.2013

Hello, how can i make that when you type an wrong password you get kicked?


Re: Wrong Password = Kick? - feartonyb - 16.07.2013

On password check dialog on the else put Kick(playerid);


Re: Wrong Password = Kick? - RajatPawar - 17.07.2013

pawn Код:
public OnDialogReponse(...)
{
   if( dialogid == DIALOG_PASSWORD )
   {
        if( !response )
        {
               SendClientMessage(.. "Sorry." );
               Kick(playerid);
        }
        YOUR CODE
    }
This is the way to kick on clicking the 2nd button on the dialog. Similarly, where you actually login the player - something like this should work.
pawn Код:
if( strcmp(inputtext, players_actual_password) == 0) // it is correct
{
      LOG HIM IN
}
else return Kick(playerid);