OnPlayerRequestClass
#1

You can't disable OnPlayerRequestClass GUI by returning false anymore. Hence making you able to spawn unlogged in for ex. RP modes. If there is an another way to disable it please inform me.
Reply
#2

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    // Your code
    return 1;
}
Reply
#3

I thought about that either, but it still wont disable the GUI which I don't want to show up when a player connects.
Reply
#4

You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?
Reply
#5

You can disable it by doing TogglePlayerSpectating and then ForceClassSelection
Reply
#6

Quote:
Originally Posted by TheMaTrIx4057
You can disable it by doing TogglePlayerSpectating and then ForceClassSelection
Thank you, that'll do the job!!!

Quote:
Originally Posted by Calgon
You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?
Returning false under OnPlayerRequestClass did disable it for me always, fully. You couldn't spawn by pressing SHIFT but it didnt work anymore in 0.3 beta.

Reply
#7

Quote:
Originally Posted by dre$tA
Quote:
Originally Posted by TheMaTrIx4057
You can disable it by doing TogglePlayerSpectating and then ForceClassSelection
Thank you, that'll do the job!!!

Quote:
Originally Posted by Calgon
You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?
Returning false under OnPlayerRequestClass did disable it for me always, fully. You couldn't spawn by pressing SHIFT but it didnt work anymore in 0.3 beta.

Returning false always bugged my server up. EWvery time you spawned you'd be in grove street with a bottle of beer or a cigarette O.o
Reply
#8

I would use ForceClassSelection and SpawnPlayer
Reply
#9

Is OnPlayerRequestClasse still called twice in RC6? I can't test it atm
Reply
#10

It's called when you die for the first time after connecting to the server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)