Jump to content

Question

Posted

Problema intalnita (descriere): Cand dau /gethit apoi gen dau 1 pumn celui pe care este contractul spune ca l-am facut.
Ero(area / rile) / warning-(ul / urile): - 
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:gethit(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SCM(playerid, -1, "{00FF00}Folosire: {FFFFFF}/gethit [hitid]");
    if(playerVariables[playerid][pGroup] == 12)
    {
        if(id != INVALID_PLAYER_ID)
        {
            if(playerVariables[id][pHeadValue] > 0)
            {
                if(GotHit[id] == 0)
                {
                    if(GoChase[playerid] == 999)
                    {
                        GoChase[playerid] = id;
                        GetChased[id] = playerid;
                        GotHit[id] = 1;
                        format(szMessage, sizeof(szMessage), "%s received a contract. Target: %s.", playerVariables[playerid][pNormalName], playerVariables[id][pNormalName]);
                        SendToGroup(12, COLOR_TEAL, szMessage);
                        format(szMessage, sizeof(szMessage), "You have a new contract. (/mycontract)");
                        SCM(playerid, COLOR_YELLOW, szMessage);
                    }
                    else
                    {
                        SCM(playerid, COLOR_GREY, "You already have a hit!");
                        SCM(playerid, COLOR_GREY, "Solve the contract or type /cancelhit to take another hit!");
                    }
                }
                else
                {
                    SCM(playerid, COLOR_GREY, "This hit has been taken by another Hitman!");
                }
            }
            else
            {
                SCM(playerid, COLOR_GREY, "This player is not a hit!");
            }
        }
        else
        {
            SCM(playerid, COLOR_GREY, "This player is not connected!");
        }
    }
    return 1;
}

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:  Da

4 answers to this question

Recommended Posts

  • 1
Posted
Acum 11 minute, Uzzi25 a spus:

Incearca asta :

  Reafișează conținuturi ascunse

CMD:gethit(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SCM(playerid, -1, "{00FF00}Folosire: {FFFFFF}/gethit [hitid]");
    if(playerVariables[playerid][pGroup] == 12)
    {
        if(id != INVALID_PLAYER_ID)
        {
            if(playerVariables[id][pHeadValue] > 0)
            {
                if(GotHit[id] == 0)
                {
                    if(GoChase[playerid] == 999)
                    {
                        GoChase[playerid] = id;
                        GetChased[id] = playerid;
                        GotHit[id] = 1;
                        format(szMessage, sizeof(szMessage), "%s received a contract. Target: %s.", playerVariables[playerid][pNormalName], playerVariables[id][pNormalName]);
                        SendToGroup(12, COLOR_TEAL, szMessage);
                        format(szMessage, sizeof(szMessage), "You have a new contract. (/mycontract)");
                        SCM(playerid, COLOR_YELLOW, szMessage);
                    }
                    else
                    {
                        SCM(playerid, COLOR_GREY, "You already have a hit!");
                        SCM(playerid, COLOR_GREY, "Solve the contract or type /cancelhit to take another hit!");
                    }
                }
                else
                {
                    SCM(playerid, COLOR_GREY, "This hit has been taken by another Hitman!");
                }
            }
            else
            {
                SCM(playerid, COLOR_GREY, "This player is not a hit!");
            }
        }
        else
        {
            SCM(playerid, COLOR_GREY, "This player is not connected!");
        }
    }
    return 1;
}
 

 

Si ce ma rog ai modificat tu? nu vad nimic modificat fata de ce am postat eu.

  • 0
Posted

Incearca asta :

Spoiler

CMD:gethit(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SCM(playerid, -1, "{00FF00}Folosire: {FFFFFF}/gethit [hitid]");
    if(playerVariables[playerid][pGroup] == 12)
    {
        if(id != INVALID_PLAYER_ID)
        {
            if(playerVariables[id][pHeadValue] > 0)
            {
                if(GotHit[id] == 0)
                {
                    if(GoChase[playerid] == 999)
                    {
                        GoChase[playerid] = id;
                        GetChased[id] = playerid;
                        GotHit[id] = 1;
                        format(szMessage, sizeof(szMessage), "%s received a contract. Target: %s.", playerVariables[playerid][pNormalName], playerVariables[id][pNormalName]);
                        SendToGroup(12, COLOR_TEAL, szMessage);
                        format(szMessage, sizeof(szMessage), "You have a new contract. (/mycontract)");
                        SCM(playerid, COLOR_YELLOW, szMessage);
                    }
                    else
                    {
                        SCM(playerid, COLOR_GREY, "You already have a hit!");
                        SCM(playerid, COLOR_GREY, "Solve the contract or type /cancelhit to take another hit!");
                    }
                }
                else
                {
                    SCM(playerid, COLOR_GREY, "This hit has been taken by another Hitman!");
                }
            }
            else
            {
                SCM(playerid, COLOR_GREY, "This player is not a hit!");
            }
        }
        else
        {
            SCM(playerid, COLOR_GREY, "This player is not connected!");
        }
    }
    return 1;
}
 

 

2c4AJX1.png

  • 0
Posted
Acum 18 ore, gamercs98 a spus:

Si ce ma rog ai modificat tu? nu vad nimic modificat fata de ce am postat eu.

Scuze asta doream sa postez am gresit :) 

Spoiler

CMD:gethit(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SCM(playerid, -1, "Syntax: /gethit [playerid]");
    if(playerVariables[playerid][pGroup] == 4)
    {
        if(id != INVALID_PLAYER_ID)
        {
            if(playerVariables[id][pHeadValue] > 0)
            {
                if(Hitman[id] == -1)
                {
                    if(Hit[playerid] == -1)
                    {
                        Hitman[id] = playerid;
                        Hit[playerid] = id;
                        format(szMessage, sizeof(szMessage), "[AGENCY NEWS] Hitman %s took the contract on %s, for a price of $%d. Good luck!", playerVariables[playerid][pNormalName], playerVariables[id][pNormalName],  playerVariables[id][pHeadValue]);
                        SendToGroup(4, COLOR_RADIOCHAT, szMessage);
                        FindedPlayer[playerid] = id;
                    }
                    else
                    {
                        SCM(playerid, COLOR_GREY, "You already have a hit!");
                        SCM(playerid, COLOR_GREY, "Solve the contract or type /cancelhit to take another hit!");
                    }
                }
                else
                {
                    SCM(playerid, COLOR_GREY, "This hit has been taken by another Hitman!");
                }
            }
            else
            {
                SCM(playerid, COLOR_GREY, "This player is not a hit!");
            }
        }
        else
        {
            SCM(playerid, COLOR_GREY, "This player is not connected!");
        }
    }
    return 1;
}

 

2c4AJX1.png

Guest
This topic is now closed to further replies.
×
×
  • 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.