2021-11-13, 01:22 AM
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;
}