16.05.2012, 16:14
I don't understand what you telling.. I think you want to make commands like /givecash spacebar (id) spacebar (amount)
Here is an example
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; }