• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] add, subtract
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.

subtract(cash, amount[1])

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;

What is the name of that include? Did you google it?

Anyway if?you do not find that include, create that function yourself using?strval.
This is just ``, `-`, etc. You don't need an include for maths.

Forum Jump: