Would this work? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Would this work? (
/showthread.php?tid=267564)
Would this work? -
Outcast - 08.07.2011
I want to increase a variable value, I made the following code:
pawn Код:
public GivePlayerMoneyEx(playerid, money)
{
GivePlayerMoney(playerid, money);
pInfo[playerid][pMoney] += money;
return 1;
}
Will the pInfo[playerid][pMoney] variable be increased with the value of "money" ? Or do I have to use:
pawn Код:
public GivePlayerMoneyEx(playerid, money)
{
GivePlayerMoney(playerid, money);
pInfo[playerid][pMoney] = pInfo[playerid][pMoney] + money;
return 1;
}
Thanks for help.
Re: Would this work? -
[HiC]TheKiller - 08.07.2011
Yes, that would work. It's the exact same thing without the extra variable.
Re: Would this work? -
Outcast - 08.07.2011
Okay, thank. I was a bit suspicious about it, never used it in that way and I don't want to mess up my gamemode. I hate when I change one thing, and then ten other things mess up lol.