30.09.2011, 21:56
Make a variable... like
then under OnPllayerSpawn put
then under the spawnkill call back... put spawnkill[playerid] = 1;
pawn Код:
new spawnkill[MAX_PLAERS];
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
new Float:Health;
GetPlayerHealth(Target,Health);
if(spawnkill[playerid] == 1)
{
if(GetPlayerTeam(Shooter) == TEAM_RED && GetPlayerTeam(Target) == TEAM_BLUE && GetPlayerWeapon(Shooter) == 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 24 || 25 || 26 || 27 || 28 || 29 || 30 || 31 || 32 || 33 || 34 ) HealthLost = Health-110;
SetPlayerHealth(Target, HealthLost);
if(GetPlayerTeam(Shooter) == TEAM_BLUE && GetPlayerTeam(Target) == TEAM_RED && GetPlayerWeapon(Shooter) == 0 || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 24 || 25 || 26 || 27 || 28 || 29 || 30 || 31 || 32 || 33 || 34 ) HealthLost = Health-110;
SetPlayerHealth(Target, HealthLost);
return 1;
}
pawn Код:
spawnkill[playerid] = 0;