[Ajuda] Contador de headShots
#1

Alguйm me ajuda? ta com os seguites bugs:

Nгo tб salvando
Tб marcando pra outro player tambйm
Queria que deixasse em "false" pra nгo dar headshot na arena
Code:

Код:
new ContarHeadShot[MAX_PLAYERS];
new PlayerText:HeadShot[MAX_PLAYERS];
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) //weaponid == 34 <- sniper , bodypart == 9 <- cabeзa
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        CreateExplosion(x, y, z, 12, 10.0);
        SetPlayerHealth(playerid, 0.0);
        GameTextForAll("~n~~n~~n~~n~~n~~n~~B~~H~HEAD ~W~~H~SHOT ~R~~H~BABY !", 5000, 3);
        SendClientMessage(playerid,-1, "{F55454}[INFO]: Vocк acaba de levar 1 HS , {7CF881}NOOB.");
        ContarHeadShot[issuerid] ++;
    }

    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == 34)  SetPlayerHealth(playerid, HP-49);       //SniperRifle
    //SOUND
    if(issuerid != INVALID_PLAYER_ID) PlayerPlaySound(issuerid,17802,0.0,0.0,0.0), PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    //SOUND
    return 1;

}
public OnPlayerConnect(playerid)
{
    SetTimerEx("VerificarHS", 1000, true, "i", playerid);
    HeadShot[playerid] = CreatePlayerTextDraw(playerid, 40.000000, 329.000000, "  ");
    PlayerTextDrawColor(playerid, HeadShot[playerid], 12582911);
    PlayerTextDrawFont(playerid, HeadShot[playerid], 3);
    PlayerTextDrawBackgroundColor(playerid, HeadShot[playerid], 255);
    PlayerTextDrawSetShadow(playerid, HeadShot[playerid], 1);
    PlayerTextDrawSetOutline(playerid, HeadShot[playerid], 1);
    return 1;
}
public VerificarHS(playerid)
{
    new string[20];
    format(string, sizeof(string), "Headshots: ~w~%i", ContarHeadShot[playerid]);
    PlayerTextDrawSetString(playerid, HeadShot[playerid], string);
}
Reply


Messages In This Thread
Contador de headShots - by zqkRazer - 03.09.2014, 15:27
Re: Contador de headShots - by n0minal - 03.09.2014, 15:31
Re: Contador de headShots - by iTzDemon - 03.09.2014, 15:36
Re: Contador de headShots - by DiiMeNoR - 03.09.2014, 15:44
Re: Contador de headShots - by N3XTMapper - 03.09.2014, 15:49
Re: Contador de headShots - by zqkRazer - 03.09.2014, 15:52
Re: Contador de headShots - by s4kuL - 03.09.2014, 16:16
Re: Contador de headShots - by zqkRazer - 03.09.2014, 16:27
Re: Contador de headShots - by zqkRazer - 03.09.2014, 16:54
Re: Contador de headShots - by zqkRazer - 03.09.2014, 17:19

Forum Jump:


Users browsing this thread: 1 Guest(s)