Commands, some small help ...
#4

I don't understand what you telling.. I think you want to make commands like /givecash spacebar (id) spacebar (amount)

Here is an example
Код:
dcmd_givecash(playerid,params[])
{
	new string[128];
	new ID, amount;
    if(sscanf(params, "ui", ID, amount))
	SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Money Given_]]");
	format(string,sizeof(string),"You have given $%d of your own money to %s(%d).",amount,PlayerName(ID),ID);
	SendClientMessage(playerid,COLOR_YELLOW,string);
	GivePlayerMoney(playerid,-amount);

	SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Money Received_]]");
	format(string,sizeof(string),"You have been given $%d by %s(%d). Make sure you thank them.",amount,PlayerName(playerid),playerid);
	SendClientMessage(ID,COLOR_YELLOW,string);
	GivePlayerMoney(ID,amount);

	format(string,sizeof(string),"2[CASH GIVEN] %s(%d) has given $%d to %s(%d).",PlayerName(playerid),playerid,amount,PlayerName(ID),ID);
	IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
	return 1;
}
Reply


Messages In This Thread
Commands, some small help ... - by Edvin - 16.05.2012, 15:51
Re: Commands, some small help ... - by Ballu Miaa - 16.05.2012, 15:53
Re: Commands, some small help ... - by Edvin - 16.05.2012, 16:00
Re: Commands, some small help ... - by MichaelProPlayer - 16.05.2012, 16:14
Re: Commands, some small help ... - by Kirollos - 16.05.2012, 16:19
Re: Commands, some small help ... - by Kirollos - 16.05.2012, 16:22
Re: Commands, some small help ... - by Edvin - 16.05.2012, 16:56

Forum Jump:


Users browsing this thread: 1 Guest(s)