11.05.2012, 10:16
Hi, i have a problem with speedometer.
On server is 2 players "x" and "y", if "x" is in a vehicle speed is indicated good but when "y" enter in a vehicle speed is blocked at both of them or speed of "x" shows to "y".
Sorry for bad english...
On server is 2 players "x" and "y", if "x" is in a vehicle speed is indicated good but when "y" enter in a vehicle speed is blocked at both of them or speed of "x" shows to "y".
Код:
public OnVehicleSpeedChange(vehicleid, newspeed, oldspeed) { new string[256]; for(new i=0; i <MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i)) { new mph = newspeed; format(string, sizeof(string), "~g~KMH: ~w~%d ~g~MPH: ~w~%d",newspeed,mph); TextDrawSetString(Lmph[i], string); TextDrawShowForPlayer(i, Lmph[i]); TextDrawShowForPlayer(i, Lmph[i]); TextDrawShowForPlayer(i, Lmph[i]); break; } } return 1; }