SA-MP Forums Archive
How to force a class toplayer? please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to force a class toplayer? please (/showthread.php?tid=249800)



How to force a class toplayer? please - VivianKris - 20.04.2011

Generally,players after enter the server,need press a key to select a class.
But now i want to force players select a class, please teel me how?
THX a lot.


Re: How to force a class toplayer? please - Finn - 20.04.2011

SetSpawnInfo might be the function you're looking for.

If you mean forcing BACK into the class selection, check ForceClassSelection.


Re: How to force a class toplayer? please - VivianKris - 21.04.2011

No No No
I thought it can auto select a class when players connect.


Re: How to force a class toplayer? please - Kitten - 21.04.2011

pawn Код:
public OnPlayerConnect(playerid) {
     SetPlayerHealth(playerid,0);
     SpawnPlayer(playerid);
     return 1;
}
not tested.


Re: How to force a class toplayer? please - VivianKris - 21.04.2011

Tested,do this will kill the player when he select class.