PlayerCreateTextDraw fuction related..
#3

pawn Код:
new Text:SPEEDOS[MAX_PLAYERS];
new Text:HEALTH[MAX_PLAYERS];
and to a callback i use

pawn Код:
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
        final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*250.666667; // 250.666667 = kmph  // 199,4166672= mph
        final_speed_int = floatround(final_speed,floatround_round);
        format(speed_string,256,"~y~Speed: ~w~%i",final_speed_int);
        PlayerTextDrawSetString(playerid,SPEEDOS[playerid], speed_string);
        PlayerTextDrawShow(playerid,SPEEDOS[playerid]);
        GetVehicleHealth(vehicleid,vehicle_health);
        final_vehicle_health = floatround(floatround(vehicle_health - 250)/ 7.5); //This will make the health show at 100 when the vehicle is not damaged and at 0 when it is in fire.
        format(health_string,256,"~r~Health: ~w~%i", final_vehicle_health);
        PlayerTextDrawSetString(playerid,HEALTH[playerid], health_string);
        PlayerTextDrawShow(playerid,HEALTH[playerid]);
Reply


Messages In This Thread
PlayerCreateTextDraw fuction related.. - by vassilis - 29.06.2012, 17:09
Re: PlayerCreateTextDraw fuction related.. - by MadeMan - 29.06.2012, 17:13
Re: PlayerCreateTextDraw fuction related.. - by vassilis - 29.06.2012, 17:18
Re: PlayerCreateTextDraw fuction related.. - by MadeMan - 29.06.2012, 17:25
Re: PlayerCreateTextDraw fuction related.. - by vassilis - 29.06.2012, 17:26

Forum Jump:


Users browsing this thread: 1 Guest(s)