- 0
incurcatura
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Tasmell
Salut.
Vreau sa transform o comanda CMD in una if(strcmp(cmdtext.... dar nu imi iese. imi da erori..
CMD:hitman(playerid, params[]) { new id, amount, GPlayerName[MAX_PLAYERS], PlayerName[MAX_PLAYERS]; GetPlayerName(id, GPlayerName, sizeof(GPlayerName)); GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); if(sscanf(params, "dd", id, amount)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /hitman <playerid> <amount>"); if(amount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You don't have enough money!"); if(amount < 1) return SendClientMessage(playerid, COLOR_YELLOW, "ERROR: The ammount must be greater than 1."); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected."); bounty[id] = bounty[id] + amount; GivePlayerMoney(playerid, 0-amount); format(szString, sizeof(szString), "* %s (ID:%d) has put a $%d bounty on %s (ID:%d)'s head. (Total: %d) ", PlayerName, playerid, amount, GPlayerName, id, bounty[id]); SendClientMessageToAll(COLOR_ORANGE, szString); format(szString, sizeof(szString), "* %s (ID:%d) has put a $%d bounty on your head. (Total: %d)", PlayerName, playerid, amount, bounty[id]); SendClientMessage(id, COLOR_ORANGE, szString); format(szString, sizeof(szString), "9*** [BOUNTY]: %s (ID:%d) has put a $%d bounty on %s (ID:%d)'s head. (Total: %d)", PlayerName, playerid, amount, GPlayerName, id, bounty[id]); IRC_GroupSay(gGroupID, IRC_CHANNEL2, szString); return 1; }Ma puteti ajuta?
5 answers to this question
Recommended Posts