SA-MP Forums Archive
Confised - Printable Version

+- SA-MP Forums Archive (
+-- Forum: SA-MP Scripting and Plugins (
+--- Forum: Scripting Help (
+--- Thread: Confised (/showthread.php?tid=608510)

Confised - Micko123 - 02.06.2016

I am bit confised here. I made this command for /buydrugs and i wrote this line.
But what this will do? Is this going to add drugs playr bought to current drug amount he have
PHP код:
PlayerInfo[playerid][pDroga] += amount
I know this sounds crazy but this came first on my mind but still don't understand what += will do

EDIT: If it won't add bought drugs to current drugs player have can someone tell me how to do that

Re: Confised - Logic_ - 02.06.2016

+= will do the same as ++ but its much more better, faster and optimized.

it will get the value of pDrogo, then will add on it and then will give you the new pDroga value, in this you can add custom value.

Re: Confised - Micko123 - 02.06.2016

Thank you