new Text:Opdracht[MAX_PLAYERS];
new Text:SPEEDOS[MAX_PLAYERS];
//==============================================================================
//TextDraws
//==============================================================================
Opdracht[playerid] = TextDrawCreate(320,431.000000,"New Stuntages /help /cmds /v /teles ..."); // Info TD on the bottom of the screen
TextDrawLetterSize(Opdracht[playerid], 0.260000, 1.400000);
TextDrawSetOutline(Opdracht[playerid], 1);
TextDrawBackgroundColor(Opdracht[playerid],0x000000ff);
TextDrawUseBox(Opdracht[playerid], 1);
TextDrawBoxColor(Opdracht[playerid], 0x000000AA);
TextDrawAlignment(Opdracht[playerid], 2);
TextDrawFont(Opdracht[playerid],2);
TextDrawShowForPlayer(playerid,Opdracht[playerid]);
//------------------------------------------------------------------------------
SPEEDOS[playerid] = TextDrawCreate(10.0,200.0," "); // SpeedoMeter TD
TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:speed_x10,Float:speed_y10,Float:speed_z10,Float:final_speed10,speed_string10[256],final_speed_int10, vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid != 0)
{
GetVehicleVelocity(vehicleid,speed_x10,speed_y10,speed_z10);
final_speed10 = floatsqroot(((speed_x10*speed_x10)+(speed_y10*speed_y10))+(speed_z10*speed_z10))*136.666667;
final_speed_int10 = floatround(final_speed10,floatround_round);
format(speed_string10,256,"Speed: %i",final_speed_int10);
TextDrawSetString(SPEEDOS[playerid], speed_string10);
}
else
TextDrawSetString(SPEEDOS[playerid], " ");
new Text:Opdracht[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW,...};
new Text:SPEEDOS[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW,...};
new Text:Opdracht[MAX_PLAYERS];
new Text:SPEEDOS[MAX_PLAYERS];
wait, no it didn't help :/ please help me I think my GM is bugged as fuck! |