29.05.2010, 10:23
$ЂЯĢ: This wasn't really designed for complex data structures, though I do see your point. The absence of a player ID means that some other form of identification would be useful to have. I think it would work much better as an optional parameter, though, as it's not always needed:
Therefore, rather than doing this:
You could do this instead:
I'll see about adding that parameter to the natives later, but it will require some additional checks.
Sma_X: Yes, it will be slower due to function overhead, but it consumes less memory (in most cases) and can be used for inter-script communication.
pawn Code:
SetGVarInt(varname[], int_value, id = 0);
pawn Code:
format(string, sizeof(string), "vehicle_%d_price", gVehicle);
SetGVarInt(string, 5000);
pawn Code:
SetGVarInt("vehicle_price", 5000, gVehicle);
Sma_X: Yes, it will be slower due to function overhead, but it consumes less memory (in most cases) and can be used for inter-script communication.