Anti team kill delay problem!!(rep+)
#8

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
You cannot control the time interval between which the player sends data to the server. The fastest of them can be OnPlayerUpdate but still needs the player to send the update to the server. Try using a better script. The script you created is pointless. It checks the gTeam on every "if". Try this simpler code (Your code modified):
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    if ( Shooter != INVALID_PLAYER_ID )
    {
        if ( gTeam[Target] == gTeam[Shooter] ) // check if the victim is from the same team as the shooter.
        {

            new Float:hp;
            new Float:ap;
            GetPlayerHealth(Target, hp);
            SetPlayerHealth(Target, hp + HealthLost);
            GetPlayerArmour(Target, ap);
            SetPlayerArmour(Target, ap + ArmourLost);
            SendClientMessage( Shooter, COLOR_RED, "Team killing is not allowed!" );
        }
    }
    return 1;
}
LOL Brother. Try re-reading my script.. You will get to know why i just dont want one if over there.
Because in my TEAM_DEFINES Two teams r allies , So they cannot shooot them as well! Nor the player can shoot them
Reply


Messages In This Thread
Anti team kill delay problem!!(rep+) - by Ballu Miaa - 17.12.2011, 12:44
Re: Anti team kill delay problem!!(rep+) - by Mrki_Drakula - 17.12.2011, 12:51
Re: Anti team kill delay problem!!(rep+) - by wildcookie007 - 17.12.2011, 12:51
Re: Anti team kill delay problem!!(rep+) - by kizla - 17.12.2011, 12:52
Re: Anti team kill delay problem!!(rep+) - by Ballu Miaa - 17.12.2011, 12:53
Re: Anti team kill delay problem!!(rep+) - by suhrab_mujeeb - 17.12.2011, 12:55
Re: Anti team kill delay problem!!(rep+) - by Ballu Miaa - 17.12.2011, 12:55
Re: Anti team kill delay problem!!(rep+) - by Ballu Miaa - 17.12.2011, 12:59
Re: Anti team kill delay problem!!(rep+) - by [ABK]Antonio - 17.12.2011, 13:16
Re: Anti team kill delay problem!!(rep+) - by kizla - 17.12.2011, 20:50

Forum Jump:


Users browsing this thread: 2 Guest(s)