How to make it to km/h
#1

Код:
public CheckStatus()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(IsPlayerInAnyVehicle(i))
			{
				if(TextShow[i] == false)
				{
				    /*TextDrawShowForPlayer(i, Text:Black0);
				    TextDrawShowForPlayer(i, Text:Black1);
				    TextDrawShowForPlayer(i, Text:Black2);
				    TextDrawShowForPlayer(i, Text:Black3);
				    TextDrawShowForPlayer(i, Text:LightBlack);*/
				    TextShow[i] = true;
				}
			    new String[128];
		        new Float:X, Float:Y, Float:Z, Float:Speed;
		        new vehicle = GetPlayerVehicleID(i);
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0);
				format(String,sizeof(String),"~w~Fuel: ~w~%i ~w~Speed: ~w~%i", Gas[vehicle], floatround(Speed, floatround_floor));
				if(VHSCreated[i] == true)
				{
					TextDrawDestroy(VHS[i]);
				}
				VHS[i] = TextDrawCreate(260.000000,420.000000,String);
				TextDrawAlignment(VHS[i],0);
				//TextDrawBackgroundColor(VHS[i],0x000000ff);
				TextDrawFont(VHS[i],1);
				TextDrawLetterSize(VHS[i],0.299999,1.000000);
				//TextDrawColor(VHS[i],0xffffffff);
				//TextDrawSetOutline(VHS[i],1);
				//TextDrawSetProportional(VHS[i],1);
				//TextDrawSetShadow(VHS[i],1);
            	TextDrawShowForPlayer(i, VHS[i]);
            	VHSCreated[i] = true;

			}
			else
			{
			    if(TextShow[i] == true)
			    {
					TextDrawHideForPlayer(i, Text:Black0);
					TextDrawHideForPlayer(i, Text:Black1);
					TextDrawHideForPlayer(i, Text:Black2);
					TextDrawHideForPlayer(i, Text:Black3);
					TextDrawHideForPlayer(i, Text:LightBlack);
					TextDrawHideForPlayer(i, Text:VHS[i]);
				    TextShow[i] = false;
				}
			}
		}
	}
}
How i make it to km/h i think its mph or whatever .. Max speed with inf is like 140 or something.. ??
Reply


Messages In This Thread
How to make it to km/h - by antsolen - 28.08.2011, 17:27
Re: How to make it to km/h - by [MWR]Blood - 28.08.2011, 17:38
AW: How to make it to km/h - by Gomma - 28.08.2011, 17:40
Re: How to make it to km/h - by [MWR]Blood - 28.08.2011, 17:46
Re: How to make it to km/h - by antsolen - 28.08.2011, 17:49
Re: How to make it to km/h - by [MWR]Blood - 28.08.2011, 17:52
Re: How to make it to km/h - by antsolen - 28.08.2011, 18:14
Re: How to make it to km/h - by titanak - 28.08.2011, 18:24

Forum Jump:


Users browsing this thread: 2 Guest(s)