Jump to content
  • 0

incurcatura


Tasmell

Question

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?

200r807.gif
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

NexT." post="127839" timestamp="1357130747"]

Daca ai transformato in strcmp trebuie sa o muti in callback la OnPlayerCommandPerformed sau cum ai tu cu comenzile strcmp ..

Defapt daca e in STRCMP trebuie pusa la OnPlayerCommandText :)

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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.