how to fix giveplayermoney?
why every time I run out to buy the money is not reduced at all? even though I have set in the script -400
---------------------------------------------------------------------------------------------------------------
and please help me fix /buycomponent
why , i use /buycomponent -250000000 and -2500000000 money be 99999999
how to fix it ?
sorry for bad my english. :D
why every time I run out to buy the money is not reduced at all? even though I have set in the script -400
Quote:
if (strcmp("/buyrod", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 2, 387.8272,-1870.7032,7.8359) && GetPlayerMoney(playerid) >= 400) { if(FRod[playerid] == 0) { FRod[playerid] = 1; SendClientMessage(playerid,0xFFFFFFFF, "Fishing Rod {88AA88}Bought!"); SendClientMessage(playerid,0xFFFFFFFF, "/TakeRod to Take it out!"); GivePlayerMoney(playerid,-400); } |
---------------------------------------------------------------------------------------------------------------
and please help me fix /buycomponent
why , i use /buycomponent -250000000 and -2500000000 money be 99999999
how to fix it ?
Quote:
CMD:buycomponent(playerid, params[]) { if(!IsAtComponent(playerid)) {// Component SendClientMessageEx(playerid, COLOR_GREY, "Kamu tidak sedang ada di toko komponen (Ocean Docks)."); return 1; } if(PlayerInfo[playerid][pJob] != 7 && PlayerInfo[playerid][pJob2] != 7) { SendClientMessageEx(playerid, COLOR_GREY, "Kamu bukan mechanic."); return 1; } new component, string[128]; if(sscanf(params, "d", component)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /buycomponent [jumlah]"); if(component < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "Error: Invalid amount of component!"); if (GetPlayerCash(playerid) >= component*10) { PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); PlayerInfo[playerid][pComponent] += component; GivePlayerCash(playerid, -(component*10)); SaveAccountsUpdate(); format(string, sizeof(string), "Kamu telah membeli %d component seharga $%d", component, component*10); SendClientMessageEx(playerid, COLOR_GREEN, string); } else { SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!"); } return 1; } |
sorry for bad my english. :D
Aucun commentaire:
Enregistrer un commentaire