15.12.2015, 19:14
Quote:
|
Код:
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;
}
|
do I have to write the bodyparts defines?
and how I'll make the command seperated with callback/enum


