13.12.2011, 12:11
(
Последний раз редактировалось [DBZ]Gohan; 13.12.2011 в 13:51.
)
REMOVED
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if ( Shooter != INVALID_PLAYER_ID )
{
if ( GetPlayerTeam( Target ) == GetPlayerTeam( Shooter ) ) // check if the victim is from the same team as the shooter.
{
new Float:hp;
GetPlayerHealth(Target, hp);
SetPlayerHealth(Target, hp + HealthLost);
SetPlayerHealth( Shooter, 0 );
SendClientMessage( Shooter, COLOR_RED, "Team killing is not allowed!" );
GivePlayerMoney( Shooter, - 5000 );
GameTextForPlayer(Shooter, "~w~next time dont teamkill!",5000,5);
}
}
return 1;
}
{
format(str, sizeof(str), "[NBTDM]:You are under anti-spawn kill for %d second(s) (spawn protection)", PROTECTIONTIME);
SendClientMessage(playerid, -1, str);
SetPlayerChatBubble(playerid, "[NBTDM]:Protected By AntiSpawnKill", 0xFF0000AA, 100.0, 5000);
SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1000,0,"d",playerid);
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
SetPlayerTeam(playerid, pTeam[playerid]); //or anything else.
return 1;
}
SetPlayerTeam(playerid, teamid)