Jump to content

Recommended Posts

Posted

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

Posted
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) {

  • 1 month later...
Posted (edited)
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
Posted
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

Posted

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. 

Posted
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));
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.