/money or /setmoney doesn't work...need help
#1

If I use /money [my-id] 10000 to set my money to 10,000
there were a bug.
ok If i have 0$ and my id is 0 i will type /money 0 10000
to set my money to 10000 (not /givemoney) my money will goto 10,000$
and then back to 0$.
What could i do to fix the bug ?? (its a german server
Thanks for your help.


Код:
	if(strcmp(cmd, "/money", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /money [playerid/PartOfName] [money]");
				return 1;
			}
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 4)
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
						ResetPlayerMoney(playa);
						ConsumingMoney[playa] = 1;
						PlayerMoney[playa] += money;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  Nicht fьr dich - MFG TOBI!");
			}
		}
		return 1;
	}
Reply
#2

pawn Код:
PlayerMoney[playa] += money;
Show me this function.
Reply
#3

Omg it's you! The guy that were chasing me with a rustler for one hour on Littlewhitey's.

Anways, use this to set playa's money to whatever the money variable is set to.

Код:
GivePlayerMoney( playa, money - GetPlayerMoney( playa ) );
Reply
#4

Can you send me the ful script please
i don't know where i must put this in...
Thanks for your help
Reply
#5

What must i do to fix this bug ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)