18.03.2017, 02:24
Is it better to declare global float variables for players and simply grab the information to fill them in OnPlayerUpdate, instead of having bajillions of 'GetPlayerPos & GetPlayerFacingAngle' happening all over the place all the time in lengthy gamemodes?, I do realise that it's bad practice to put 'lenthy or strenious' code within OnPlayerUpdate.. but I don't think 'GetPlayerPos & GetPlayerFacingAngle' is either of those do you?
eg
Then just use the LivePos positions where required throughout the gamemode.. yes or no?
eg
PHP код:
new Float:LivePos_x[MAX_PLAYERS],Float:LivePos_y[MAX_PLAYERS],Float:LivePos_z[MAX_PLAYERS],Float:LivePos_a[MAX_PLAYERS];
//OnPlayerUpdate
GetPlayerPos(playerid, LivePos_x[playerid], LivePos_y[playerid], LivePos_z[playerid]);
GetPlayerFacingAngle(playerid, LivePos_a[playerid]);