• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] add, subtract
#1
I haven't did any coding over 4-5 years now. Anyways I decided to start working on my gamemode again. I used to have an include to add, subtract, divide, multiply stocks. Does anyone has this include? I have to find all the plugins and includes but since the main forum is down everything is hard to find. Thanks.



Code:
subtract(cash, amount[1])



Code:
stock GivePlayerCash(playerid, amount[]) {

    static cash[256];

    GetPVarString(playerid, "pMoney", cash, 256);

    if(strfind(amount, "-") == 0) SetPVarString(playerid, "pMoney", subtract(cash, amount[1]));

    else SetPVarString(playerid, "pMoney", add(cash, amount));

    return 1;

}
  Reply


Messages In This Thread
add, subtract - by ZyZu. - 2021-11-13, 01:22 AM
RE: add, subtract - by Radical - 2021-11-15, 02:01 PM
RE: add, subtract - by Y_Less - 2021-11-17, 09:00 PM

Forum Jump: