06.02.2011, 20:09
(
Последний раз редактировалось antonio112; 06.02.2011 в 23:02.
)
Quote:
Class ID != skin ID.
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass So the first AddPlayerClass is class ID 0 and the second one is class ID 1, etc. ![]() |
If I`m not wrong, you're trying to say next:
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0:gTeam[playerid] = TEAM_POLICE; // First AddPlayerClass in GameModeInit
case 1:gTeam[playerid] = TEAM_POLICE;// Second AddPlayerClass in GameModeInit
}
}
Let`s say I have 100 AddPlayerClass ... or how about if I have more than 1 skin per team? Can`t I somehow group them all together?
What I mean is next: Instead of "case 0: bla bla" to use "case 71,123,200, etc: bla bla" - 71,123,200, etc = Skins ID which I used.
Is there anyway of using Skins ID instead of Class ID? Or is it better, easier to use class ID ? If yes, how can I set it up using class ID ?
Later Edit: Okay, so I`ve played around my script, taking note of what you said and I think I somehow fixed the problem. Instead of using:
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
pawn Код:
SetPlayerTeamFromClass(playerid, skinid)
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new skinid = GetPlayerSkin(playerid);
Thank you for your help.
Later later edit:
Yes, I finally fixed it.
Thanks [03]Garsino for your help.