22.07.2012, 01:17
Would it be wiser to define a variable and store a player's current vehicle ID in that vairable than using 'GetPlayerVehicleID(playerid);' each time or even doing 'new vid = GetPlayerVehicleID(playerid);' each time you need to get the ID more than once.
Example:
And using 'ServerData[playerid][CurrentVehicleID]' throughout the rest of the script.
Would all that be wiser than what I stated above?
Example:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
ServerData[playerid][CurrentVehicleID] = GetPlayerVehicleID(playerid);
return 1;
}
Would all that be wiser than what I stated above?