Help me please.
#1

Quote:

GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, 0 - amount);
SendClientMessage(playerid, 0x00FF00AA, "You have sent money.");
SendClientMessage(giveplayerid, 0x00FF00AA, "Money recieved.");

I want it to be that the player recieves ''You have recieved (Amount) from (Player)
And if it send :''You have send (Amount) To (Player)

How to do it?
Reply
#2

Search the forum

lots of TuTs about this.
Reply
#3

Add the following stock to your gamemode where the rest of your stock functions are:

pawn Код:
stock pName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}

pawn Код:
new string[128];
GivePlayerMoney(giveplayerid, amount);
GivePlayerMoney(playerid, 0 - amount);
format(string, sizeof(string), "You have sent $%d to [%d]%s.", amount, giveplayerid, pName(giveplayerid));
SendClientMessage(playerid, 0x00FF00AA, string);
format(string, sizeof(string), "You have received $%d from [%d]%s.", amount, playerid, pName(playerid));
SendClientMessage(giveplayerid, 0x00FF00AA, string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)