Headshot System Help
#1

I want to make this headshot system, so example:
when i shoot a player it should show:

Areeb has been shoot by XBoss30 to the head and XBoss30 has earned $100

here is my code:

On top of the script
new headshot[MAX_PLAYERS];

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID)
    {
        if(
IsPlayerConnected(issuerid))
        {
            if(
bodypart == 9)
            {
                
SetPlayerHealth(playerid0.0);
                new 
string[100];
                
GetPlayerName(playeridheadshotsizeof(headshot));
                
format(stringsizeof(string), "%s was shoot to the head by %d and %d has earned $100"headshotissuerid);
                
GivePlayerMoney(issuerid100);
                
SendClientMessageToAll(COLOR_RED,string);
                
GameTextForPlayer(issuerid,"~r~Headshot",2000,3);
                
PlayerPlaySound(issuerid178020.00.00.0);
                
GameTextForPlayer(playerid,"~r~Headshot",2000,3);
                
PlayerPlaySound(playerid178020.00.00.0);
                
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Headshot System Help - by XBoss30 - 03.01.2017, 10:41
Re: Headshot System Help - by iLearner - 03.01.2017, 10:49
Re: Headshot System Help - by XBoss30 - 03.01.2017, 10:54
Re: Headshot System Help - by Logic_ - 03.01.2017, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)