SA-MP Forums Archive
[Help] How to I add player classes for players depending on their team choise? - 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: [Help] How to I add player classes for players depending on their team choise? (/showthread.php?tid=453557)



[Help] How to I add player classes for players depending on their team choise? - Dylan_Madigan69 - 25.07.2013

Before class selection, the player choses their team (0=civi, 1=Team Blue, 2=Team Green). I used the code TeamID[playerid] = 0; to set teams. I want it where your chose of playable skins is dependant on what your team id is. If the player chose 0, they would only see and be able to chose from civillian skins. If the player is on team 1, they get some military skins, and on team 2 they would get other military skins.

Feel free to ask questions, and thanks for the help.


Re: [Help] How to I add player classes for players depending on their team choise? - iggy1 - 25.07.2013

The only library i know that lets you do this is y_classes part of YSI.


Re: [Help] How to I add player classes for players depending on their team choise? - Sasino97 - 25.07.2013

Another way could be to make a custom class selection by spawning directly the player with SpawnPlayer and then moving him to a specific location, freezing him, editing his camera position and rotation, adding "next" and "previous" textdraws that can be clicked to change class, and detecting left and right keys to do the same thing (additional).
It's not very hard but it takes hours.. especially for textdraws and camera positions..


Re: [Help] How to I add player classes for players depending on their team choise? - Dylan_Madigan69 - 25.07.2013

Thx [GF]Sasino97, thats a good idea. Would anyone know of someone posting a code like this that i could just edit? it would be easyer.