/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


Messages In This Thread
/money or /setmoney doesn't work...need help - by Tobii - 19.05.2009, 19:05
Re: /money or /setmoney doesn't work...need help - by MenaceX^ - 19.05.2009, 19:40
Re: /money or /setmoney doesn't work...need help - by Slice - 19.05.2009, 20:01
Re: /money or /setmoney doesn't work...need help - by Tobii - 20.05.2009, 19:10
Re: /money or /setmoney doesn't work...need help - by Tobi2503 - 21.05.2009, 10:22

Forum Jump:


Users browsing this thread: 1 Guest(s)