Hitman
#1

Bug in hitman he don't Show the who hitted u + /bounties don't work
PHP код:
CMD:hitman(playeridparams[])
{
    if ( 
PlayerInfo[playerid][Jailed] == ) return SendClientMessageplayerid, -1""RED"ERROR: "GREY"You Can't Use This Command in Jail" );
    new 
idamount;
    if(
sscanf(params"ui"idamount)) return SendClientMessage(playerid, -1,"{FF9966}Info: {FFFFFF} /hitman [Player-ID][Amount]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playeridCOLOR_RED"That player is not connected.");
    if(
isHitman[playerid] == 1) return SendClientMessage(playeridCOLOR_RED"Hitmen can not place contracts.");
    if(
isHitman[id] == 1) return SendClientMessage(playeridCOLOR_RED"That player already has the maximum hit on him.");
    if(
hit[id] == 150000 || hit[id] > 150000) return SendClientMessage(playeridCOLOR_RED"That player already has the maximum hit on him.");
    if(
amount 50000 || amount 150000) return SendClientMessage(playeridCOLOR_RED"Hits range from $50,000 - $150,000.");
    if(
hit[id] + amount 150000) return SendClientMessage(playeridCOLOR_RED"That hit is too high for this player, please lower it.");
    
hit[id] = hit[id] + amount;
    new 
result[128];
    new 
tname[MAX_PLAYER_NAME];
    
GetPlayerName(idtnamesizeof(tname));
    
format(resultsizeof(result), "{e4a186}%s has got a $%i bounty put on his head from %s (total:%i$).Kill this player and get a bounty!"amounttname,GetName(playerid));
    
SendClientMessageToAll(-1result);
    new 
string[128];
    
format(stringsizeof(string), "{FF4444}You have got a %i$ bounty put on you from %s(%d)!"amounttname,playerid);
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
isHitman[i])
            {
                
SendClientMessage(i, -1string);
            }
        }
    }
    return 
1;
}
CMD:bounties(playeridparams[])
{
      if ( 
PlayerInfo[playerid][Jailed] == ) return SendClientMessageplayerid, -1""RED"ERROR: "GREY"You Can't Use This Command in Jail" );
      if(
isHitman[playerid] == 1)
      {
        
SendClientMessage(playerid0x00D9ADFF"- Current Bounties:");
        new 
string[128];
        new 
tname[MAX_PLAYER_NAME];
        foreach(
Playeri)
        {
            if(
IsPlayerConnected(i))
            {
                if(
hit[i] > 0)
                {
                    
format(stringsizeof(string), "{fcff97}%s(%d): $%i,"tname,playerid,hit[i]);
                    
SendClientMessage(playerid, -1string);
                }
            }
        }
      }
      return 
1;

Reply
#2

Код:
format(result, sizeof(result), "{e4a186}%s has got a $%i bounty put on his head from %s (total:%i$).Kill this player and get a bounty!", amount, tname,GetName(playerid));
You forgot to change the "amount, tname, GetName(playerid)" it looks like, they don't match.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)