Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
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?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
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.
Posts: 1,767
Threads: 124
Joined: Mar 2010
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.