15.01.2013, 19:07
Код:
CMD:hit(playerid, params[]) { new amount; if(sscanf(params, "ud", ID, amount)) return SendClientMessage(playerid, RED, "[USAGE]: /hit [name/id] [amount]"); if(amount < 10000) return SendClientMessage(playerid, COLOR_AQUA, "The hit must be atleast $10K."); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, RED, "Player not found."); if(ID == playerid) return SendClientMessage(playerid, COLOR_AQUA, "You cant place a hit on yourself."); if(GetPlayerCash(playerid) < amount) return SendClientMessage(playerid, RED, "Insufficient funds."); if(HasHit[ID] > 0) return SendClientMessage(playerid, COLOR_AQUA, "That player already has a hit contract placed on them."); { HasHit[ID] = amount; HasPlacedHit[ID] = playerid; format(fstr, sizeof(fstr), "You have placed a hit on %s [%d] for $%d.", GetName(ID), ID, amount); SendClientMessage(playerid, COLOR_AQUA, fstr); GameTextForPlayer(playerid,"HIT PLACE ON %s FOR $%d ", 5000, 5); format(fstr2, sizeof(fstr2), "[HIT]: %s [%d] has placed a hit contract on %s [%d] for $%d.", GetName(playerid), playerid, GetName(ID), ID, amount); SendClientMessageToAll(COLOR_AQUA, fstr2); SendClientMessage(ID, COLOR_AQUA, "You now have a hit contract!"); } return true; }
Quote:
GameTextForPlayer(playerid,"HIT PLACE ON %s FOR $%d ", 5000, 5); |