Posts: 220
Threads: 54
Joined: Jan 2014
Quote:
Originally Posted by iZN
Why don't you just put that to OnPlayerUpdate? Or to a global timer.
pawn Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInAnyVehicle(playerid)) // if the player is in vehicle? { // Show them speed information new vid = GetPlayerVehicleID(playerid); CarInfo[vid][Metres] += (vitesse[playerid]*10)/36; if(CarInfo[vid][Metres] > 999) { CarInfo[vid][Kilometres] += 1; CarInfo[vid][Metres] = 0; } format(string, sizeof(string), "M: %d - KM: %d", CarInfo[vid][Metres], CarInfo[vid][Kilometres]); SendClientMessage(playerid, -1, string); } return true; }
|
OnPlayerUpdate would use more resources than if I use a timer and then I kill right?