02.04.2013, 14:35
Ok, I got this now.
The problem.. Yes, It doesnt return to class selection, when he dies.
even if he presses F4.
But.. If a player connects... he cant choose his team?
The problem.. Yes, It doesnt return to class selection, when he dies.
even if he presses F4.
But.. If a player connects... he cant choose his team?
pawn Код:
public OnPlayerRequestClass( playerid, classid )
{
class_selection[ playerid ] = 1;
if(class_selection[ playerid ] == 0)
{
new string[128];
SetPlayerPos(playerid, 786.2990,845.2061,176.7938);
SetPlayerCameraPos(playerid, 779.6148,845.5803,180.1051);
SetPlayerCameraLookAt(playerid, 786.2990,845.2061,176.7938);
if( isDead[ playerid ] == 1 ) SpawnPlayer( playerid );
if(classid == 0)
{
format(string, sizeof(string), "~r~Terrorists");
GameTextForPlayer(playerid, string, 3000, 6);
SetPlayerSkin(playerid, 294);
PlayerInfo[playerid][pTeam] = 1;
SetPlayerColor(playerid, COLOR_RED);
return 0;
}
else if(classid == 1)
{
format(string, sizeof(string), "~b~Counter-Terrorists");
GameTextForPlayer(playerid, string, 3000, 6);
SetPlayerSkin(playerid, 285);
PlayerInfo[playerid][pTeam] = 2;
SetPlayerColor(playerid, COLOR_BLUE);
return 0;
}
}
if( isDead[ playerid ] == 1 && class_selection[ playerid ] == 1 )
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SetSpawnInfo( playerid, 0, 294, 195.5586, 427.2332, 12.7379, 269.15, 0, 0, 0, 0, 24, 50 );
SpawnPlayer( playerid );
}
else if(PlayerInfo[playerid][pTeam] == 2)
{
SetSpawnInfo( playerid, 0, 285, 49.1121, 423.5605, 12.7379, 269.15, 0, 0, 0, 0, 24, 50 );
SpawnPlayer( playerid );
}
return 1;
}
return 1;
}