Hello There, Guest! Login or Register


Hitman
#1
Hello again my fellow scripters  :P
This time I'm wondering about a "Hitman-duty mini-game"

I've been looking around the internet for information about hitman commands, and I've only found these:
Quote:  if(strcmp(cmd, "/hitman", true) == 0)
        {
                //new tmp[256];
              // tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                        SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /hitman [playerid] [amount]");
                        return 1;
                }
                giveplayerid = strval(tmp);
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
              {
                        SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /hitman [playerid] [amount]");
                        return 1;
                }
                new moneys;
                moneys = strval(tmp);
                if(moneys > GetPlayerMoney(playerid))
                {
                        SendClientMessage(playerid, COLOR_ORANGE, "You don't have enough money!");
                        return 1;
                }
              if(moneys < 1)
                {
                        SendClientMessage(playerid, COLOR_ORANGE, "Hey what are you trying to pull here.");
                        return 1;
                }
                if(IsPlayerConnected(giveplayerid)==0)
              {
                        SendClientMessage(playerid, COLOR_ORANGE, "No such player exists.");
                        return 1;
                }
                bounty[giveplayerid]+=moneys;
                GivePlayerMoney(playerid, 0-moneys);
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "%s has had a $%d bounty put on his head from %s (total: $%d).", giveplayer, moneys, sendername, bounty[giveplayerid]);
                SendClientMessageToAll(COLOR_ORANGE, string);
                format(string, sizeof(string), "You have had a $%d bounty put on you from %s (id: %d).", moneys, sendername, playerid);
                SendClientMessage(giveplayerid, COLOR_ORANGE, string);
                return 1;
        }
        if(strcmp(cmd, "/bounty", true) == 0)
        {
              new tmp[256];
              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
                {
                        SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /bounty [playerid]");
                        return 1;
                }
                giveplayerid = strval(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "Player %s (id: %d) has a  $%d bounty on his head.", giveplayer,giveplayerid,bounty[giveplayerid]);
                        SendClientMessage(playerid, COLOR_ORANGE, string);
                }
                else
                {
                        SendClientMessage(playerid, COLOR_ORANGE, "No such player exists!");
                }
                return 1;
        }
        if(strcmp(cmd, "/bounties", true) == 0)
        {
                //              new tmp[256];
                new x;
                SendClientMessage(playerid, COLOR_GREEN, "Current Bounties:");
                for(new i=0; i < MAX_PLAYERS; i++)
                {
                        if(IsPlayerConnected(i) && bounty[i] > 0)
                        {
                              GetPlayerName(i, giveplayer, sizeof(giveplayer));
                                format(string, sizeof(string), "%s%s(%d): $%d", string,giveplayer,i,bounty[i]);
                                x++;
                                if(x > 3)
                                {
                                        SendClientMessage(playerid, COLOR_YELLOW, string);
                                        x = 0;
                                        format(string, sizeof(string), "");
                                }
                                else
                                {
                                        format(string, sizeof(string), "%s, ", string);
                                }
                        }
                }
                if(x <= 3 && x > 0)
                {
                      string[strlen(string)-2] = '.';
                        SendClientMessage(playerid, COLOR_ORANGE, string);
                }
                return 1;
      }

But wouldn't it be cool if every 40 minutes a Server bot, takes a random playername (ofc the player have to be connected, lol..)
and then a message goes out to the
Quote:"gTeam = TEAM_Hitman "


Quote: "% Has ha Bounty on 800 000$ - The time has come to act now, and fast, good luck agent"

So it's like server bot picking a random name.. hope you understood it.. and since I'm not the super scripter I wonder if someone would be intrested in helping me..again xD...

oh and yes, It's not supposed to be like it is on LVP where you get a wanted level if you kill people. It just suposed to be a bot picking random names.
but the hardes part according to me is to make sure that the Hitman who kills the Annonced player get 800 000$ in chash..


You could do this even more fun, by seting the price of the "target" depending on the targets kill ratio.. but I have no clue how to do that..
//over and out 8)

:w :Y) :z

oh! and If someone acctually, against all odds, comes up with a working script, OFC you will be the creator, so all the "glory" will go to you ;) naah but you get it.
credits to the creator.. :)
Reply