How would I detect a players class selection BEFORE they spawn? - 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: How would I detect a players class selection BEFORE they spawn? (
/showthread.php?tid=312873)
How would I detect a players class selection BEFORE they spawn? -
Hoborific - 23.01.2012
Noticed a few servers have managed to do this, looking for an example.
Re: How would I detect a players class selection BEFORE they spawn? -
MP2 - 23.01.2012
Try to explain clearer.
Re: How would I detect a players class selection BEFORE they spawn? -
Hoborific - 23.01.2012
I want to attach objects to a player, depending on their skin as they toggle through the AddPlayerClasses.
Re: How would I detect a players class selection BEFORE they spawn? -
viper_viper - 23.01.2012
Put it in the OnPlayerRequestClass(playerid, classid)
Everytime a the player moves one through the selection, that event is called. Simply add a switch with "classid" and add the right objects.
pawn Код:
OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0: // Add certain objects for each class
}
}