Posts: 225
Threads: 45
Joined: Nov 2008
Reputation:
0
Hi,
I'm working on a login system for my Server.
Now I want to prevent players from spawning before login.
I done this by returning zero in OnPlayerRequestSpawn().
But the player can be spawned without login (e.g. kill by admin).
Is it possible to return to the Class Selection until the player login?
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
Use "ForcePlayerClassSelection" then "SpawnPlayer" if they're not logged in.
Posts: 225
Threads: 45
Joined: Nov 2008
Reputation:
0
Currently I have the problem that the player can falls from the Class Selection place (I don't know why).
I try /cmdlist (The command is not in any Filterscript or in the game mode) and can select the player color.
If I select a row from the menu the player falls from the Class Selection place.
Then the player dies but the functions OnPlayerSpawn() or OnPlayerDeath() didn't get called.
//EDIT: I restarted the server and the command "/cmdlist" does not work anymore.
Posts: 49
Threads: 5
Joined: Jan 2008
Reputation:
0
public OnPlayerRequestSpawn(playerid)
{
return LoggedIn[playerid];
}
Now, if you have other code under OnPlayerRequestSpawn, add this to the top of the function:
if(!LoggedIn[playerid])
{
return 0;
}
Posts: 36
Threads: 3
Joined: Aug 2009
Reputation:
0
Good luck finding one . Or just learn how to do it.