Command for Godfather GM [Hitman Agency]
#1

I need a command please, take a look at this:

pawn Code:
else if ((strcmp("Takehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Takehit")))
        {
            if(PlayerInfo[playerid][pRank] < 4)
            {
                SendClientMessage(playerid, COLOR_GREY, "You need Rank 4 to Cancel Contracts!");
                return 0;
            }
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Usage: Takehit [name/id]");
                return 0;
            }
            //giveplayerid = strval(tmp);
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(PlayerInfo[giveplayerid][pMember] != 8)
                    if(PlayerInfo[giveplayerid][pLeader] != 8)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "That player is not a Hitman!");
                        return 0;
                    }
                    if(GoChase[giveplayerid] < 999)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "That Hitman is already busy with a Contract!");
                        return 0;
                    }
                    if(IsPlayerConnected(hitid))
                    {
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerName(giveplayerid, giver, sizeof(giver));
                        GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
                        //format(string, sizeof(string), "You canceled %s's contract to kill: %s(ID:%d), for $%d.", giver, giveplayer, hitid, PlayerInfo[hitid][pValue]);
                        //SendClientMessage(playerid, COLOR_YELLOW, string);
                        //format(string, sizeof(string), "Hitman %s has canceled your contract to kill: %s(ID:%d), for $%d.", sendername, giveplayer, hitid, PlayerInfo[hitid][pValue]);
                        //SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                        format(string, sizeof(string), "* Hitman %s canceled $s's contract.", sendername, giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
                        SendFamilyMessage(8, COLOR_YELLOW, string);
                        GoChase[giveplayerid] = hitid;
                        GetChased[hitid] = giveplayerid;
                        GotHit[hitid] = 1;
                        hitid = 0;
                        hitfound = 0;
                        return 0;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "The Contracted Person is offline, use Contracts in the Portable again !");
                        return 0;
                    }
                }
                return 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "That Hitman is not Online, or ain't a Hitman!");
                return 0;
            }
        }
This is from the hitman faction, a command that is used to cancel the contracts when a player is afk, and something isn't working. Can you fix it for me please?
Reply
#2

need to see more of your code and the errors are o so usefull if there are any
Reply
#3

There are no errors, it's just that something isn't working right. This command is in /portable, i want to know what's wrong with it. Can you please make me this command work ... pleeeeeeeeeaseeee. What parts of the code do I need to show you?
Reply
#4

UP!!
Reply
#5

BUMP!
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)