25.07.2013, 05:05
Код:
public SpeedoUpdate() { for(new i = 0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i)) { new Float:x,Float:y,Float:z,Float:hp,string[24],vehicleid = GetPlayerVehicleID(i); TextDrawShowForPlayer(i,box[i]); TextDrawShowForPlayer(i,speed[i]); TextDrawShowForPlayer(i,health[i]); GetVehicleVelocity(vehicleid,x,y,z); GetVehicleHealth(vehicleid,hp); format(string,sizeof(string),"Speed: %dmph",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*156.666667)); TextDrawSetString(speed[i],string); format(string,sizeof(string),"Health: %d",floatround(hp)); TextDrawSetString(health[i],string); } if(!IsPlayerInAnyVehicle(i)) { TextDrawHideForPlayer(i,box[i]); TextDrawHideForPlayer(i,speed[i]); TextDrawHideForPlayer(i,health[i]); } } }
![Confused](images/smilies/confused.png)