It sets the player team when the player selects a terrorists skin but it does not work or counter-terrorists
Код:
switch(classid)
{
case 73,121,122,179,254:
{
Team[playerid] = TERRORISTS;
SetPlayerColor(playerid, COLOR_RED);
return 1;
}
case 284,285,287,280:
{
Team[playerid] = C_TERRORISTS;
SetPlayerColor(playerid, COLOR_BLUE);
return 1;
}
}
Код:
public OnGameModeInit()
{
AddPlayerClass(258, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // case 0
AddPlayerClass(202, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // case 1
AddPlayerClass(198, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // case 2
AddPlayerClass(261, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // case 3
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch (classid)
{
case 0, 1: // terrorist
{
//code
}
case 2, 3://C-Terorist
{
//code
}
}
return 1;
}