SA-MP Forums Archive
Command for Godfather GM [Hitman Agency] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command for Godfather GM [Hitman Agency] (/showthread.php?tid=210599)



Command for Godfather GM [Hitman Agency] - ceapacufasole - 13.01.2011

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?


Re: Command for Godfather GM [Hitman Agency] - Rizard - 13.01.2011

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


Re: Command for Godfather GM [Hitman Agency] - ceapacufasole - 13.01.2011

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?


Re: Command for Godfather GM [Hitman Agency] - ceapacufasole - 14.01.2011

UP!!


Re: Command for Godfather GM [Hitman Agency] - ceapacufasole - 15.01.2011

BUMP!