05.06.2016, 14:02
I was only giving an example, but creating a variable and setting it to something, and then using that variable multiple times it better than using CallRemoteFunction multiple times.
is better than
Код:
new Float: h = CallRemoteFunction("GetPlayerHealthEx", "i", playerid); if (h ...) else if (h ...) printf("%f", h); SetPlayerHealth(playerid, h);
Код:
if (CallRemoteFunction("GetPlayerHealthEx", "i", playerid) ...) else if (CallRemoteFunction("GetPlayerHealthEx", "i", playerid) ...) printf("%f", CallRemoteFunction("GetPlayerHealthEx", "i", playerid)); SetPlayerHealth(playerid, CallRemoteFunction("GetPlayerHealthEx", "i", playerid));