Making headshot Dis/able cmd
#3

Quote:
Originally Posted by SnG.Scot_MisCuDI
Посмотреть сообщение
Код:
new bool:HeadShots;
CMD:headshot(playerid, params[])
{
	//isplayeradmin(here)
	{
		if(HeadShots == false)
		{
			SendClientMessage(playerid, COLOR, "You have enabled headshots");
			HeadShots = true;
		}
		else
		{
			HeadShots = false;
			SendClientMessage(playerid, COLOR, "You have disabled headshots");
		}
	}
	return 1;
}
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && bodypart == 9 && HeadShots == true) 
    {
        // One shot to the head to kill
        SetPlayerHealth(playerid, 0.0);
    }
    return 1;
}
What if I want it as a Filterscript?
do I have to write the bodyparts defines?
and how I'll make the command seperated with callback/enum
Reply


Messages In This Thread
Making headshot Dis/able cmd - by SyCHO - 15.12.2015, 17:45
Re: Making headshot Dis/able cmd - by SnG.Scot_MisCuDI - 15.12.2015, 18:12
Re: Making headshot Dis/able cmd - by SyCHO - 15.12.2015, 19:14
Re: Making headshot Dis/able cmd - by SyCHO - 16.12.2015, 19:36
Re: Making headshot Dis/able cmd - by SyCHO - 20.12.2015, 20:29
Re: Making headshot Dis/able cmd - by SaltySandy - 20.12.2015, 20:36

Forum Jump:


Users browsing this thread: 2 Guest(s)