Command error
#1

When player wanna send money to player it's says unknown command idk why

Код:
CMD:givecash(playerid,params[])
{
   new
   id,
   amount,
   l_string[200],
   name[MAX_PLAYERS],
   name2[MAX_PLAYERS],
   ID,
   string8[200];
   if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,red,"/givecash [id] [amount]");
   if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid,RED,"You don't have enought cash");
   if(amount < 0) return SendClientMessage(playerid,RED,"You have entered an invalid amount");
   if(id == playerid) return SendClientMessage(playerid,RED,"You can't give money to yourself.");
   F_GivePlayerMoney(playerid,-amount);
   F_GivePlayerMoney(id,amount);
   GetPlayerName(playerid,name,25);
   format(l_string,128,"%s has given to you the amount of cash: %i$",name,amount);
   SendClientMessage(id,COLOR_LIME,l_string);

   GetPlayerName(ID, name2, sizeof(name2));
   format(string8, sizeof(string8),"You have transfered %i$ to %s",amount,name2);
   SendClientMessage(playerid, COLOR_LIME, string8);
   return 1;
}
Reply


Messages In This Thread
Command error - by Mijata - 16.01.2017, 13:15
Re: Command error - by oMa37 - 16.01.2017, 13:16
Re: Command error - by Mijata - 16.01.2017, 13:29
Re: Command error - by SyS - 16.01.2017, 13:32
Re: Command error - by Mijata - 16.01.2017, 13:37
Re: Command error - by SyS - 16.01.2017, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)