Class Selection
#1

Is there a way to COMPLETELY AVOID the "OnPlayerRequestClass" callback from being called ever? I am working on an RP server and was originally using "TogglePlayerSpectating()" to hide the class selection menu bar at the bottom of the screen when a player connects. I discovered that doing that caused my mode to bug on the second time that someone died- except I'm only returning 1 under OnPlayerDeath...

I know the GF script has a way to "bypass" class selection, but I can't see any specific code which allows it to do this. Any ideas?
Reply
#2

add return 0; in OnPlayerRequestClass. Thats what i used for my own RP Server
Reply
#3

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
add return 0; in OnPlayerRequestClass. Thats what i used for my own RP Server
I did that once before, but it didn't make a difference. I'll try again here soon, but for some reason, pawncc is having a bit of an issue on my computer tonight!
Reply
#4

Okay, that did nothing. Now when I die it gives me the little box to change my class (and hit spawn), instead of skipping class selection. I wish there was an in-built way to skip the damned thing. Too bad ****** hasn't come out with something that will let me do that! Thanks for trying anyways...
Reply
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
Actually I have... y_classes USED to work, but then I broke something, I've been working on this recently though to get it back working properly. For future reference you would use:

pawn Код:
Class_DenySelection(playerid);
Class_AllowReselection(false);
SpawnPlayer(playerid);
To entirely remove it. Shame there's no "AllowReselection" per-player, maybe that will get added during this rewrite.
I had completely forgot about the y_classes library. I hope to see the fixed version released soon. Thanks AGAIN, ******.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)