08.11.2012, 09:45
The hitman command is not working properly./contract is gone for no use when a hitman use contract on a player it says you already have a contract placed on that player.The Code
Код:
CMD:contract(playerid, params[]) { new string[128], playerb, amount; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(sscanf(params, "ui", playerb, amount)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /contract [playerid] [amount]"); if(IsAHitman(playerid)) return SendClientMessage(playerid, COLOR_GREY, "No... just no Motherfucker!"); if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You must be at least level 3 to make a contract on someone."); if(amount < 3000 || amount > 50000) return SendClientMessage(playerid, COLOR_GREY, "Contracts are between $3000 and $50,000."); if(PlayerInfo[playerid][pMoney] < amount) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much on you at the moment."); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected."); if(playerid == playerb) return SendClientMessage(playerid, COLOR_GREY, "You can't contract yourself."); if(PlayerInfo[playerb][pLevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You can't contract people under level 3."); if(!strcmp(RPN(playerid), PlayerInfo[playerb][pContractBy], false)) return SendClientMessage(playerid, COLOR_GREY, "You have already placed a contract on this player."); if(PlayerInfo[playerb][pContract] >= 150000) return SendClientMessage(playerid, COLOR_GREY, "Player has the maximum contract amount on his head already."); PlayerInfo[playerb][pContract] += amount; format(PlayerInfo[playerb][pContractBy], 32, "%s", RPN(playerid)); GiveSanzilMoney(playerid, -amount); format(string, sizeof(string), "HitmanWarn: %s has placed a contract on %s for $%d.", RPN(playerid), RPN(playerb), amount); SendHitmanMessage(COLOR_YELLOW, string); SendAdminMessage(COLOR_DARKRED, 3, string); Log("logs/contract.log", string); return 1; }