Class selection bug help +rep
#5

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
You are doing it incorrectly.

For classes , You should use
Код:
 AddPlayerClass
, not defining it , Let's take an example:
pawn Код:
public OnGameModeInit()
{

        AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // this is the classid 0, be cause it's the first class added in the script.
        return 1;
}
The class is set, Now let's check WHEN player chose the class:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
      switch(classid) // better way for checking player's classid
      {
            case 0: // if he choose classid 0 (as above in ongamemodeinit function)
            {
                    /*Here, you will set player's pos, skin, team, etc.. , and he'll spawn ofc. */
            }
       }
       return 1;
}
P.S,
use gTeam only, SetPlayerTeam not needed,
like :
pawn Код:
gTeam[playerid] = TEAM_TA;
worked! thank you very much +rep
Reply


Messages In This Thread
Class selection bug help +rep - by Ryz - 14.11.2014, 04:28
Re: Class selection bug help +rep - by Sparke - 14.11.2014, 04:31
Re: Class selection bug help +rep - by Ryz - 14.11.2014, 04:34
Re: Class selection bug help +rep - by Sawalha - 14.11.2014, 05:31
Re: Class selection bug help +rep - by Ryz - 14.11.2014, 05:58

Forum Jump:


Users browsing this thread: 1 Guest(s)