09.03.2011, 22:00
how i make players cant shoot their team?? im using gTeam
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
if(gTeam[shooter] == gTeam[target])
{
SendClientMessage(shooter,0xFFFFFFAA,"Don't shoot your friend ! xD");
SetPlayerHealth(shooter, 0.0);
}
return 1;
}
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
if(gTeam[shooter] == gTeam[target])
{
SendClientMessage(shooter,0xFFFFFFAA,"Don't shoot your friend ! xD");
}
return 1;
}
public OnPlayerSpawn(playerid)
{
switch gTeam[playerid]
{
case TEAM_1: SetPlayerTeam(playerid, TEAM_1);
case TEAM_2: SetPlayerTeam(playerid, TEAM_2);
}
}