if(classid == 0)
{
gTeam[playerid] = BALLAS;
GameTextForPlayer(playerid,"~w~Ballas",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
}
else if(classid == 1)
{
gTeam[playerid] = GROVES;
GameTextForPlayer(playerid,"~w~Grove Street Famlilys",3000,5);
SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
SetPlayerFacingAngle(playerid,252.4717);
SetPlayerColor(playerid,0x55FF00FF);
}
}
if(classid == 0) { Group_SetPlayer(gParamedics, playerid, true); GameTextForPlayer(playerid,"~w~Ballas",3000,5); // This will show up an Text , when you select your class SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779); SetPlayerFacingAngle(playerid,122.4500); SetPlayerColor(playerid,0xA000FFFF); // Teamcolor } |
if(classid == 0 || classid == 1 || classid == 2 || classid == 3) { Group_SetPlayer(gCrips, playerid, true); GameTextForPlayer(playerid,"~w~Crips",3000,5); // This will show up an Text , when you select your class SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779); SetPlayerFacingAngle(playerid,122.4500); SetPlayerColor(playerid,0xA000FFFF); // Teamcolor } else if(classid == 4 || classid == 5 || classid == 6 || classid == 7) { Group_SetPlayer(gSBF, playerid, true); GameTextForPlayer(playerid,"~w~The Seville Boulevard Crips",3000,5); // This will show up an Text , when you select your class SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779); SetPlayerFacingAngle(playerid,122.4500); SetPlayerColor(playerid,0xA000FFFF); // Teamcolor } |
new g_pClassID[ MAX_PLAYERS ];
g_pClassID[ playerid ] = classid;
if( g_pClassID[ playerid ] == 1 )
{
Group_SetPlayer( Group1, playerid, true );
}
else if( g_pClassID[ playerid ] == 2 )
{
Group_SetPlayer( Group2, playerid, true );
}
public OnPlayerRequestClass(playerid, classid)
{
g_pClassID[playerid] = classid;
if(g_pClassID[playerid] == 0 || g_pClassID[playerid] == 1 || g_pClassID[playerid] == 2 || g_pClassID[playerid] == 3)
{
GameTextForPlayer(playerid,"~w~Crips",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
}
else if(g_pClassID[playerid] == 4 || g_pClassID[playerid] == 5 || g_pClassID[playerid] == 6 || g_pClassID[playerid] == 7)
{
GameTextForPlayer(playerid,"~w~The Seville Boulevard Crips",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
}
public OnPlayerSpawn(playerid)
{
if(g_pClassID[playerid] == 0 || g_pClassID[playerid] == 1 || g_pClassID[playerid] == 2 || g_pClassID[playerid] == 3)
{
Group_SetPlayer(gCrips, playerid, true);
}
else if(g_pClassID[playerid] == 4 || g_pClassID[playerid] == 5 || g_pClassID[playerid] == 6 || g_pClassID[playerid] == 7)
{
Group_SetPlayer(gSBF, playerid, true);
}
Given that you're doing this in OnPlayerRequestClass, don't forget to remove them from that group again when they change skin - otherwise they will just stay in that group indefinately.
|