How do I kick when player gives damage?
#3

Quote:
Originally Posted by ChristolisTV
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage

And I can create it for you! :

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    new 
string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
    new 
weaponname[24];
    
GetPlayerName(playeridattackersizeof (attacker));
    
GetPlayerName(damagedidvictimsizeof (victim));
    
Kick(attacker);
    return 
1;

Haven't tested it but it may work! :P
If you don't know what is going on, don't even try to help someone.

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(damagedid != INVALID_PLAYER_ID)
    {
        Kick(playerid);
    }
    return 1;
}

// OR

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        Kick(issuerid);
    }
    return 1;
}
Reply


Messages In This Thread
How do I kick when player gives damage? - by Dzordzomordzo - 23.03.2016, 14:41
Re: How do I kick when player gives damage? - by ChristolisTV - 23.03.2016, 14:46
Re: How do I kick when player gives damage? - by ]Rafaellos[ - 23.03.2016, 15:47
Re: How do I kick when player gives damage? - by Dzordzomordzo - 24.03.2016, 10:43
Re: How do I kick when player gives damage? - by NaS - 24.03.2016, 11:05

Forum Jump:


Users browsing this thread: 3 Guest(s)