Problem with TogglePlayerControllable
#3

Quote:
Originally Posted by Hrb
View Post
Ahoj, pouћij public "OnPlayerTakeDamage" vice zde: https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Jednoduљe zkontroluj jestli je afk a pak mu nastav zpět ћivoty, kterй mб mнt.

Hi, try using public "OnPlayerTakeDamage" more info: https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Just check if is player afk and then set back his health bar.
CZ: Napsal jsem si ten kуd takto a nic.
EN: I have wrote following code, but it does not work anyway.

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID)
    {
        if(
weaponid == && AFK[playerid] == true)
        {
            new 
Float:iarmour;
            
GetPlayerArmour(playeridiarmour);
            if(
iarmour 0)
            {
                
SetPlayerArmour(playeridamount);
            }
            else
            {
                
SetPlayerHealth(playeridamount);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 10:19
Re: Problem with TogglePlayerControllable - by Hrb - 27.02.2018, 11:42
Re: Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 13:18
Re: Problem with TogglePlayerControllable - by Hrb - 27.02.2018, 14:10
Re: Problem with TogglePlayerControllable - by Sew_Sumi - 27.02.2018, 14:52
Re: Problem with TogglePlayerControllable - by Lucases - 27.02.2018, 21:02
Re: Problem with TogglePlayerControllable - by ForestCZE - 27.02.2018, 21:07
Re: Problem with TogglePlayerControllable - by Sew_Sumi - 27.02.2018, 21:40

Forum Jump:


Users browsing this thread: 1 Guest(s)