21.06.2012, 21:12
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:
And I'm using the function
This is currently what I got:
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
pawn Код:
new gTeam[MAX_PLAYERS];
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;
}