02.08.2012, 11:27
Quote:
yes, local variables (declared within a function) are destroyed after function ends, if you create new variable with same name it will remember it's value from previous declaration, therefore you don't need to have global variables but you can create static variables everytime you want to use them
|
Quote:
Targetid is a variable in your code, so change:
pawn Code:
pawn Code:
|
Quote:
If your variable is inside your command (as you've showed to us) Than it won't be a global variable that you can actually use in your script.
In the top of your mod, under all of your includes, defines, etc... Where you probably have variables there, just add the "Money" variable, and then you'll be able to use it in your whole script, without using stating it as a new ("new") variable each time ![]() |
RPed+