This at top
Код:
static gTeam[MAX_PLAYERS];
#define TEAM_WORKER 0
#define TEAM_PIMP 1
#define TEAM_TRIAD 2
#define TEAM_FBI 3
then this under OnGameModeInit
Код:
AddPlayerClass(260,-2062.5583,237.4662,35.7149,268.8936,22,272,25,40,4,1); //Worker
AddPlayerClass(249,-2224.6045,-138.5713,35.3203,352.6432,0,0,0,0,0,0); //Pimp
AddPlayerClass(118,-2635.3606,1397.4556,7.0938,210.2745, 22, 100, 28, 300, 30, 350); //Triad
AddPlayerClass(286,-1635.0077,665.8105,7.1875,264.2244,29,300,22,170,3,1); //FBI
then this somewhere else
Код:
public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1003.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerClass(playerid, classid);
SetupPlayerForClassSelection(playerid);
gPlayerClass[playerid] = classid;
switch (classid) {
case 0:
{
GameTextForPlayer(playerid, "~g~Worker", 500, 3);
}
case 1:
{
GameTextForPlayer(playerid, "~g~Pimp", 500, 3);
}
case 2:
{
GameTextForPlayer(playerid, "~g~Triad", 500, 3);
}
case 3:
{
GameTextForPlayer(playerid, "~g~FBI", 500, 3);
}
}
return 1;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
SetPlayerClass(playerid, classid) {
if(classid == 0) {
gTeam[playerid] = TEAM_WORKER;
} else if(classid == 1) {
gTeam[playerid] = TEAM_PIMP;
} else if(classid == 2) {
gTeam[playerid] = TEAM_TRIAD;
} else if(classid == 3) {
gTeam[playerid] = TEAM_FBI;
}
}