OnPlayerShootPlayer - Problem
#10

Quote:
Originally Posted by [RLG]Zepp
Посмотреть сообщение
Dont Works.
Who can help me?
And who can make, if i have Armor, then is the DMG normal?

Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
	new Float:Health;
	GetPlayerHealth(Target,Health);
	
	if(spawnkill[Shooter] == 0)
	{
    /*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-0;
	SetPlayerHealth(Target, HealthLost);
	GetPlayerHealth(Target, Health);
    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-0;
	SetPlayerHealth(Target, HealthLost);
	GetPlayerHealth(Target, Health);*/
	}
	if(spawnkill[Shooter] == 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);
	GetPlayerHealth(Target, Health);
    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);
	GetPlayerHealth(Target, Health);
	}
	return 1;
}
the GetPlayerWeapon part is scripted VERY BAD.
pawn Код:
public OnPlayerSpawn(playerid)
{
    spawnkill[playerid]=1;
    SetTimerEx("RemoveSpawnKill",4000,0,"i",playerid);
}
forward RemoveSpawnKill(playerid);
public RemoveSpawnKill(playerid)
{
   spawnkill[playerid]=0;
}
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    new Float:Health,Float:Armour;

    if(spawnkill[Target] == 1 && GetPlayerTeam(Shooter) != GetPlayerTeam(Target))
    {
            GetPlayerHealth(Target, Health);
            GetPlayerArmour(Target, Armour);
        SetPlayerHealth(Target, HealthLost+Health);
        SetPlayerArmour(Target,ArmourLost+Armour);
    }
    return 1;
}
Discussed a million times in the OPSP topic.
Reply


Messages In This Thread
OnPlayerShootPlayer - Problem - by [RLG]Zepp - 30.09.2011, 21:06
Re: OnPlayerShootPlayer - Problem - by BigAl - 30.09.2011, 21:56
Re: OnPlayerShootPlayer - Problem - by [RLG]Zepp - 30.09.2011, 22:14
Re: OnPlayerShootPlayer - Problem - by BigAl - 30.09.2011, 22:17
Re: OnPlayerShootPlayer - Problem - by [RLG]Zepp - 30.09.2011, 22:23
Re: OnPlayerShootPlayer - Problem - by BigAl - 30.09.2011, 22:26
Re: OnPlayerShootPlayer - Problem - by [RLG]Zepp - 30.09.2011, 22:31
Re: OnPlayerShootPlayer - Problem - by BigAl - 30.09.2011, 22:49
Re: OnPlayerShootPlayer - Problem - by [RLG]Zepp - 04.10.2011, 14:34
Re: OnPlayerShootPlayer - Problem - by wups - 04.10.2011, 15:12

Forum Jump:


Users browsing this thread: 5 Guest(s)