Quote:
Originally Posted by Shadoww5
PHP код:
new Team[ MAX_PLAYERS ];
public public OnPlayerShootPlayer( Shooter, Target, Float:HealthLost, Float:ArmourLost )
{
new J1[ MAX_PLAYER_NAME ];
new J2[ MAX_PLAYER_NAME ];
GetPlayerName( Shooter, J1, 24 );
GetPlayerName( Target, J2, 24 );
if( Team[ Shooter ] == Team[ Target ] )// Este codigo so ira setar a vida de quem levou um tiro caso ele seja do mesmo "time" do atirador. Caso nгo, ele perdera vida normalmente.
{
SetPlayerHealth( Target, 100 );
}
return true;
}
|
Presta atenзгo antes de postar algo.
Se a array "Team" leva MAX_PLAYERS, nas funзхes tem de ser: Team[ playerid ][ ... ].