Class Selection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Class Selection (
/showthread.php?tid=303719)
Class Selection -
Scenario - 15.12.2011
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?
Re: Class Selection -
Ballu Miaa - 15.12.2011
add return 0; in OnPlayerRequestClass. Thats what i used for my own RP Server
Re: Class Selection -
Scenario - 15.12.2011
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!
Re: Class Selection -
Scenario - 15.12.2011
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...
Re: Class Selection -
Scenario - 15.12.2011
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, ******.