Available to choose between multiple skins on each team? -
.Wicked - 21.06.2012
Alright I need some help me with my gamemode.
Very appreciated if someone could help me.
I would need some help with how to make multiple skins on each team.
Somehow I can't get it to work.
I've defined my teams:
pawn Код:
#define TEAM_SAS 1
#define TEAM_SPETSNAZ 2
And I'm using the function
This is currently what I got:
pawn Код:
public OnGameModeInit()
{
SetGameModeText("Whatever");
AddPlayerClass(285, 1958.3783, 1343.1572, 15.3746, 269.1425, 31, 200, 22, 100, 4, 1); // Sas
AddPlayerClass(284, 1958.3783, 1343.1572, 15.3746, 269.1425, 31, 200, 22, 100, 4, 1); // Sas
AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 31, 200, 22, 100, 4, 1); // Sas
AddPlayerClass(73, 1958.3783, 1343.1572, 15.3746, 269.1425, 31, 200, 22, 100, 4, 1); // Sas
AddPlayerClass(124, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 200, 22, 100, 4, 1); // Spetsnaz
AddPlayerClass(126, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 200, 22, 100, 4, 1); // Spetsnaz
AddPlayerClass(111, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 200, 22, 100, 4, 1); // Spetsnaz
AddPlayerClass(112, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 200, 22, 100, 4, 1); // Spetsnaz
return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_SAS;
GameTextForPlayer(playerid, "~b~Sas", 1000, 3);
SetPlayerPos(playerid, 508.9641,-88.0964,998.9683);
SetPlayerFacingAngle(playerid, 1.2533);
SetPlayerCameraPos(playerid, 508.8021,-85.0079,998.9609);
SetPlayerCameraLookAt(playerid, 508.9641,-88.0964,998.9683);
SetPlayerInterior(playerid, 11);
}
case 1:
{
gTeam[playerid] = TEAM_SPETSNAZ;
GameTextForPlayer(playerid, "~r~Spetsnaz", 1000, 3);
SetPlayerPos(playerid, 508.9641,-88.0964,998.9683);
SetPlayerFacingAngle(playerid, 1.2533);
SetPlayerCameraPos(playerid, 508.8021,-85.0079,998.9609);
SetPlayerCameraLookAt(playerid, 508.9641,-88.0964,998.9683);
SetPlayerInterior(playerid, 11);
}
}
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_SAS)
{
SetPlayerColor(playerid, SasColor);
}
else if(gTeam[playerid] == TEAM_SPETSNAZ)
{
SetPlayerColor(playerid, SpetsnazColor);
}
//------------------------------------//
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
//------------------------------------//
return 1;
}
Re: Available to choose between multiple skins on each team? -
Vince - 21.06.2012
case 0..3 and
case 4..7.
Re: Available to choose between multiple skins on each team? -
.Wicked - 21.06.2012
Could you please explain a bit more as I've just started to script and I've never used the function you just showed me ^^
I appreciate though for your quick replay
Re: Available to choose between multiple skins on each team? -
Revo - 21.06.2012
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0 .. 3: //Class 0 1 2 3
{
gTeam[playerid] = TEAM_SAS;
GameTextForPlayer(playerid, "~b~Sas", 1000, 3);
SetPlayerPos(playerid, 508.9641,-88.0964,998.9683);
SetPlayerFacingAngle(playerid, 1.2533);
SetPlayerCameraPos(playerid, 508.8021,-85.0079,998.9609);
SetPlayerCameraLookAt(playerid, 508.9641,-88.0964,998.9683);
SetPlayerInterior(playerid, 11);
}
case 4 .. 7: //Class 4 5 6 7
{
gTeam[playerid] = TEAM_SPETSNAZ;
GameTextForPlayer(playerid, "~r~Spetsnaz", 1000, 3);
SetPlayerPos(playerid, 508.9641,-88.0964,998.9683);
SetPlayerFacingAngle(playerid, 1.2533);
SetPlayerCameraPos(playerid, 508.8021,-85.0079,998.9609);
SetPlayerCameraLookAt(playerid, 508.9641,-88.0964,998.9683);
SetPlayerInterior(playerid, 11);
}
}
return 1;
}
Re: Available to choose between multiple skins on each team? -
.Wicked - 21.06.2012
Oh fuck yeah I get it! Thanks
!