problem with login dialog
#1

when i log in to my server the first thing that shows up is the login dialog but then 1 second later it goes away and you get to see the class selection and people are able to play without logging in/registering

how to make my login dialog show up AFTER the class selection pops up? the login system is actually in a filterscript so its on a different ''onplayerconnect'' and i want to keep it in a filterscript but how do i fix this problem now
Reply
#2

Welp, you can create a variabile per player that holds if he successfully login and if he not get kick.
In case you dont have a class based gamemode you can move the dialog in the OnPlayerRequestClass callback if the OnPlayerConnect have problems
Reply
#3

OnPlayerRequestSpawn

PHP код:
if(Player[playerid][registered] && !Player[playerid][logged] || !Player[playerid][registered]) return 0
Reply
#4

It sounds like you have all of the things you want to handle in the code after you show the dialog. Try moving it to OnDialoge response and handle it there.
Reply
#5

Create a callback in your filterscript and call it on your gamemode.
Reply
#6

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
OnPlayerRequestSpawn

PHP код:
if(Player[playerid][registered] && !Player[playerid][logged] || !Player[playerid][registered]) return 0
this is not what i mean

i'm saying that the filterscript which has the login dialog loads for the player first and then the onplayerconnect from the gamemode loads and the dialog from the filterscript onplayerconnect disappears so they dont get to the see the dialog at all only for 0,5 seconds when they log in and then it switches to the team class selection.

i want the onplayerconnect from the gamemode to show first and then the filterscript's onplayerconnect so the login dialog keeps showing and the player can fill in their password and or register, if they click cancel from there or press ESC they will get kicked but now that wont happen cuz the dialog dissapears
Reply
#7

here i recorded the problem, take a look at it and explain how i can fix the problem someone


https://www.you tube.com/watch?v=_p35A_3HBkA
Reply
#8

In the gamemode's OnPlayerRequestClass just return 1; when a player is not logged in yet. Then the class selection menu won't appear and the Dialog will stay on.
Reply
#9

Just make sure you return 0 on player request spawn and class if player is not logged in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)