[Help] RequestClass
#7

You need to manually set the spawn info (SetPlayerSpawnInfo) in OnPlayerRequestClass and then toggle the player spectating (on and off again).

Quote:
Originally Posted by Mike861
Посмотреть сообщение
Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(LoggedIn[playerid] == 0)
    {
          return 0;
    }
    return 1;
}
You could make a variable to check if the player has entered a correct password and logged in. By having that, you can restrict players from spawning if they did not login.
The return value of OnPlayerRequestClass just defines whether or not the player will recieve the spawn info, but not if the player stays in the class selection or not.
If you want to restrict a player from spawning, you need to return 0 in OnPlayerRequestSpawn.

Also this has been asked a few hundred times, you could just search for a solution.
Reply


Messages In This Thread
[Help] RequestClass - by ApolloScripter - 04.12.2018, 15:50
Re: [Help] RequestClass - by v1k1nG - 04.12.2018, 15:53
Re: [Help] RequestClass - by Mike861 - 04.12.2018, 15:56
Re: [Help] RequestClass - by ApolloScripter - 04.12.2018, 16:08
Re: [Help] RequestClass - by ApolloScripter - 04.12.2018, 16:19
Re: [Help] RequestClass - by ApolloScripter - 04.12.2018, 16:49
Re: [Help] RequestClass - by NaS - 04.12.2018, 17:20
Re: [Help] RequestClass - by ApolloScripter - 04.12.2018, 18:19
Re: [Help] RequestClass - by NaS - 04.12.2018, 18:25

Forum Jump:


Users browsing this thread: 2 Guest(s)