Any way to force login
#1

well, i made a registration system on samp, and i would like to force players to log in before getting to the class selection screen, anyone hass any idea how to do this?
Reply
#2

You can't, really. If a dialog shown in OnPlayerConnect is responded to, either by clicking one of the buttons or pressing escape, the class selection will be shown regardless of whether that dialog gets shown again (e.g. wrong password). You can only prevent players from spawning.
Reply
#3

Ah okay thank you
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
You can't, really. If a dialog shown in OnPlayerConnect is responded to, either by clicking one of the buttons or pressing escape, the class selection will be shown regardless of whether that dialog gets shown again (e.g. wrong password). You can only prevent players from spawning.
Isn't it possible with player spectating ? so well thats one way to do it maybe ? PlayerSpectating > login > he spawns as soon as you get him out of the spectating > kill him + forceclassSelection

That works, but it's not really a neat way.
Reply
#5

So, one day I was trying to get rid of all this crap from my gamemode like spawn buttons (GUI), class request stuff and other.. so I just started thinking logically that day and said to myself that I should really spawn players as soon as they connect (timerEx 300ms or something) and then I can do whatever I want with them once they are spawned. Set their virtual world to their own ID so they are never going to be visible for anybody else and create your own Class selection (if necessary, but it wasn't for me).

Once that's done, I just don't have to give a fuck about Class selection callbacks, spawn buttons and mess around with Spectating mode. It's just better for me to keep it server-sided anyways.

It isn't hard to create it all from scratch. I don't really know if anybody did something like that before and released it, but just give it a try, I find it better personally.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)