19.05.2009, 19:05
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.
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; }