Jump to content

Problema - Factiune (HITMAN) / FAIL


Mr.Pawno

Recommended Posts

Acum 9 ore, Mr.Pawno a spus:

Salut, am o problema cu factiunea 'Hitman', orice as face,  (cine e in hitman, da fail la '/mycontract').
Daca da 'LAMA' = Fail / Distanta 100.m+ = fail / Distanta sub 100. = fail.

Ma poate ajuta si pe mine cineva ? Va rog frumos

Arata ce ai la

if(PlayerHit[killerid] == playerid) {

Link to comment
Share on other sites

  • 1 month later...
On 12/16/2019 at 9:58 AM, Koqs said:

Arata ce ai la

if(PlayerHit[killerid] == playerid) {

// HITMAN
    if(GotHit[playerid] > 0)
    {
        if(GetChased[playerid] < 999)
        {
            if(IsPlayerConnected(GetChased[playerid]))
            {
                SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your hit has left the server.");
                GoChase[GetChased[playerid]] = 999;
                togfind[GetChased[playerid]] = 0;
                PlayerInfo[GetChased[playerid]][pHitT] = 0;
                pLastHit[ playerid ] = INVALID_PLAYER_ID;
                new string[124];
                mysql_format(SQL, string, sizeof(string), "UPDATE users SET `HitT`='%d' WHERE `name`='%s'", PlayerInfo[GetChased[playerid]][pHitT], PlayerInfo[GetChased[playerid]][pNormalName]);
                mysql_tquery(SQL,string,"","");
            }
        }
    }
    if(GoChase[playerid] != 999)
    {
        GotHit[GoChase[playerid]] = 0;
        GetChased[GoChase[playerid]] = 999;
        GoChase[playerid] = 999;
        pLastHit[ playerid ] = INVALID_PLAYER_ID;
    }
    GetChased[playerid] = 999;                     GotHit[playerid] = 0;
Edited by Mr.Pawno
add: https://pastebin.com/5sPuvSqS
Link to comment
Share on other sites

On 2/11/2020 at 3:55 PM, ionutdrg45 said:

Arata codul de unde ti se trimite mesajul ca este fail ca sa ne putem da seama de ce nu este in regula.

 if(PlayerInfo[playerid][pHeadValue] > 0)
        {
            if(IsPlayerConnected(killerid))
            {
                if(PlayerInfo[killerid][pMember] == 11)
                {
                    if(GoChase[killerid] == playerid)
                    {
                        new killer[MAX_PLAYER_NAME];
                        GetPlayerName(killerid, killer, sizeof(killer));
                        GivePlayerCash(killerid, PlayerInfo[playerid][pHeadValue]);
                        if(Undercover[killerid] == 1 && PhoneOnline[killerid] == 1 && GetDistanceBetweenPlayers(killerid,playerid) >= 100)
                        {
                            format(string,256,"%s has succesfully completed the contract on %s for $%s, distance: %.0fm.",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]),GetDistanceBetweenPlayers(killerid,playerid));
                        }
                        if(Undercover[killerid] == 0)
                        {
                            format(string,256,"%s failed to complete the contract on %s for $%s, distance: %.0fm. Fail reason: not undercover.",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]),GetDistanceBetweenPlayers(killerid,playerid));
                        }
                        if(PhoneOnline[killerid] == 0)
                        {
                            format(string,256,"%s failed to complete the contract on %s for $%s, distance: %.0fm. Fail reason: phone turned on.",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]),GetDistanceBetweenPlayers(killerid,playerid));
                        }
                        if(GetDistanceBetweenPlayers(killerid,playerid) <= 99)
                        {
                            format(string,256,"%s failed to complete the contract on %s for $%s, distance: %.0fm. Fail reason: distance/weapon.",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]),GetDistanceBetweenPlayers(killerid,playerid));
                        }
                        SendFamilyMessage(11, COLOR_TEAL, string);
                        PlayerInfo[playerid][pHeadValue] = 0;
                        GotHit[playerid] = 0;
                        GetChased[playerid] = 999;
                        GoChase[killerid] = 999;
                        new str[256];
                        mysql_format(SQL,str,sizeof(str),"UPDATE users SET `HeadValue`='0' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
                        mysql_tquery(SQL,str,"","");
                        Update(killerid, pCashx);
                        togfind[killerid] = 0;
                        PlayerInfo[killerid][pHitT] = 300;
                        mysql_format(SQL, string, sizeof(string), "UPDATE users SET `HitT`='%d' WHERE `name`='%s'", PlayerInfo[killerid][pHitT], PlayerInfo[killerid][pNormalName]);
                        mysql_tquery(SQL,string,"","");
                    }
                }
            }
            return 1;
        }

 

 

Sau -> https://pastebin.com/G75Y1R87

Link to comment
Share on other sites

Care dintre motive sunt afișate când da fail, distanta, undercover sau telefonul pornit? De asemenea mai ai nevoie de niște verificări, dacă e cuțit și distanta mai mica de 99 sa nu se pună fail și cred ca ar fi util și dacă e mai mare distanta de 99 sa verifici dacă are sniper, pentru ca de presupune ca ar trebui sa fie silențios, cu alte arme nu prea e. 

Link to comment
Share on other sites

On 2/13/2020 at 6:58 AM, ionutdrg45 said:

Care dintre motive sunt afișate când da fail, distanta, undercover sau telefonul pornit? De asemenea mai ai nevoie de niște verificări, dacă e cuțit și distanta mai mica de 99 sa nu se pună fail și cred ca ar fi util și dacă e mai mare distanta de 99 sa verifici dacă are sniper, pentru ca de presupune ca ar trebui sa fie silențios, cu alte arme nu prea e. 

Poi primesc fail pe distanta.

if(GetDistanceBetweenPlayers(killerid,playerid) <= 99)
{
    format(string,256,"%s failed to complete the contract on %s for $%s, distance: %.0fm. Fail reason: distance/weapon.",killer,name,FormatNumber(PlayerInfo[playerid][pHeadValue]),GetDistanceBetweenPlayers(killerid,playerid));
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.