?Help
#7

Errors are fixed, but the textdraw is not showing..
Код:
new PlayerText:vSpeedBox[MAX_PLAYERS]
Under public OnPlayerConnect(playerid)
Код:
	vSpeedBox[playerid] = CreatePlayerTextDraw(playerid,540.666259, 418.637756, "0");
	PlayerTextDrawLetterSize(playerid, vSpeedBox[playerid], 0.000000, -3.155556);
	PlayerTextDrawTextSize(playerid, vSpeedBox[playerid], 649.999572, 0.000000);
	PlayerTextDrawAlignment(playerid, vSpeedBox[playerid], 1);
	PlayerTextDrawColor(playerid, vSpeedBox[playerid], 0);
	PlayerTextDrawUseBox(playerid, vSpeedBox[playerid], true);
	PlayerTextDrawBoxColor(playerid, vSpeedBox[playerid], 102);
	PlayerTextDrawSetShadow(playerid, vSpeedBox[playerid], 0);
	PlayerTextDrawSetOutline(playerid, vSpeedBox[playerid], 0);
	PlayerTextDrawFont(playerid, vSpeedBox[playerid], 2);
Under public OnPlayerStateChange(playerid, newstate, oldstate)
Код:
	if(newstate == PLAYER_STATE_DRIVER)
	{
	        new str [ 30 ];
			vID = GetPlayerVehicleID(playerid);
			vv = GetVehicleModel(vID);
			LinkVehicleToInterior(vID, GetPlayerInterior(playerid));
			format(str, sizeof(str), "%s", vehName[vv - 400]);
			PlayerTextDrawSetString(playerid, vTD[playerid], str);
			PlayerTextDrawShow(playerid, vTD[playerid]);
   			SetTimerEx("hidevTD", 3200, false, "i", playerid);
			// Hide Box
			if(Speedo[playerid] == 1)
			{
			    SetTimerEx("speedinfotd",1000,1,"d",playerid);
				PlayerTextDrawShow(playerid, vSpeed[playerid]);
    			PlayerTextDrawShow(playerid, vSpeedBox[playerid]);
			}
		}
Код:
forward speedinfotd(playerid);
	public speedinfotd(playerid)
	{
		new String [ 30 ];
	        new Float:X;
	        new Float:Y;
	        new Float:Z;
	        GetVehicleVelocity(GetPlayerVehicleID(playerid),X,Y,Z);
	        format(String,150,"~W~~Y~%d",floatround(floatsqroot(X * X + Y * Y + Z * Z) * 200.0000));
		PlayerTextDrawSetString(playerid, vSpeedBox[playerid], String);
	        return 1;
	}
Reply


Messages In This Thread
?Help - by fireranger11 - 22.05.2017, 06:32
Re: ?Help - by DarkSkull - 22.05.2017, 06:40
Re: ?Help - by fireranger11 - 22.05.2017, 06:43
Re: ?Help - by DarkSkull - 22.05.2017, 06:45
Re: ?Help - by Aly - 22.05.2017, 06:50
Re: ?Help - by DarkSkull - 22.05.2017, 06:55
Re: ?Help - by fireranger11 - 22.05.2017, 07:19
Re: ?Help - by fireranger11 - 22.05.2017, 07:30

Forum Jump:


Users browsing this thread: 1 Guest(s)