01.10.2015, 21:04
Bug in hitman he don't Show the who hitted u + /bounties don't work
PHP код:
CMD:hitman(playerid, params[])
{
if ( PlayerInfo[playerid][Jailed] == 1 ) return SendClientMessage( playerid, -1, ""RED"ERROR: "GREY"You Can't Use This Command in Jail" );
new id, amount;
if(sscanf(params, "ui", id, amount)) return SendClientMessage(playerid, -1,"{FF9966}Info: {FFFFFF} /hitman [Player-ID][Amount]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "That player is not connected.");
if(isHitman[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Hitmen can not place contracts.");
if(isHitman[id] == 1) return SendClientMessage(playerid, COLOR_RED, "That player already has the maximum hit on him.");
if(hit[id] == 150000 || hit[id] > 150000) return SendClientMessage(playerid, COLOR_RED, "That player already has the maximum hit on him.");
if(amount < 50000 || amount > 150000) return SendClientMessage(playerid, COLOR_RED, "Hits range from $50,000 - $150,000.");
if(hit[id] + amount > 150000) return SendClientMessage(playerid, COLOR_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(id, tname, sizeof(tname));
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));
SendClientMessageToAll(-1, result);
new string[128];
format(string, sizeof(string), "{FF4444}You have got a %i$ bounty put on you from %s(%d)!", amount, tname,playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(isHitman[i])
{
SendClientMessage(i, -1, string);
}
}
}
return 1;
}
CMD:bounties(playerid, params[])
{
if ( PlayerInfo[playerid][Jailed] == 1 ) return SendClientMessage( playerid, -1, ""RED"ERROR: "GREY"You Can't Use This Command in Jail" );
if(isHitman[playerid] == 1)
{
SendClientMessage(playerid, 0x00D9ADFF, "- Current Bounties:");
new string[128];
new tname[MAX_PLAYER_NAME];
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(hit[i] > 0)
{
format(string, sizeof(string), "{fcff97}%s(%d): $%i,", tname,playerid,hit[i]);
SendClientMessage(playerid, -1, string);
}
}
}
}
return 1;
}