textdraw prob
#1

look at these textdraws
Код:
black[i] = TextDrawCreate(504.000000,379.000000,"_");
				TextDrawUseBox(black[i],1);
				TextDrawBoxColor(black[i],0xC40000FF);
				TextDrawTextSize(black[i],621.000000,0.000000);
				TextDrawAlignment(black[i],0);
				TextDrawBackgroundColor(black[i],0x000000FF);
				TextDrawFont(black[i],2);
				TextDrawLetterSize(black[i],1.700000,5.250000);
				TextDrawColor(black[i],WHITE);
				TextDrawSetOutline(black[i],1);
				TextDrawSetProportional(black[i],1);
				TextDrawSetShadow(black[i],1);

				Speedom[i] = TextDrawCreate(505.000000,380.000000,string);
				TextDrawUseBox(Speedom[i],1);
				TextDrawBoxColor(Speedom[i],0xC40000FF);
				TextDrawTextSize(Speedom[i],620.000000,0.000000);
				TextDrawAlignment(Speedom[i],0);
				TextDrawBackgroundColor(Speedom[i],0x000000FF);
				TextDrawFont(Speedom[i],2);
				TextDrawLetterSize(Speedom[i],0.299999,1.000000);
				TextDrawColor(Speedom[i],WHITE);
				TextDrawSetOutline(Speedom[i],1);
				TextDrawSetProportional(Speedom[i],1);
				TextDrawSetShadow(Speedom[i],1);
i want them to be
Код:
TextDrawCreate(410.000000, 435.000000
but it goes WAY off
Reply
#2

Create :
pawn Код:
new black[i], Speedom;
http://forum.sa-mp.com/index.php?topic=143025.0
Reply
#3

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(307) : error 017: undefined symbol "i"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(307) : error 021: symbol already defined: "Speedom"
Reply
#4

put more lines and stop creating Topics, Pessa help on a topic only.
Reply
#5

OK I GOT THE BOX where its surpose to be now the letters are out of it..
Reply
#6

Sorry my bad english , I From Brazilian
Reply
#7

ok the textdraw is showing but the text isnt showing in the textdraw..
Код:
public Speedometer()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
	  {
	    if(ShowSpeed[i] == 1)
	    {
	      #define MULTIPLY_SPEED 4
				new Float:x, Float:y, Float:z, Float:Dis, Float:health, string[256];TextDrawDestroy(black[i]); TextDrawDestroy(Speedom[i]);
				GetPlayerPos(i, x, y, z); GetVehicleHealth(GetPlayerVehicleID(i), health); new vehicleid = GetPlayerVehicleID(i);
				new VehicleModel = GetVehicleModel(GetPlayerVehicleID(i));
				Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));
				if(Fuel[vehicleid] <= 0){ RemovePlayerFromVehicle(i); SendClientMessage(i, COLOR_YELLOW, "[FUEL]: There is no fuel in the vehicle.");}
				if(Fuel[vehicleid] <= 25){ SendClientMessage(i, DARKRED, "[FUEL]: Low Fuel Refuel At A Gas Station Soon."); GameTextForPlayer(i,"~r~LOW FUEL",5000,3); }
        if(Fuel[vehicleid] <= 24){ SendClientMessage(i, DARKRED, "[FUEL]: Low Fuel Refuel At A Gas Station Soon."); GameTextForPlayer(i,"~r~LOW FUEL",5000,3); }
				if(VehicleModel==509||VehicleModel==481||VehicleModel==510) {SetVehicleHealth(GetPlayerVehicleID(i), 1000); Fuel[vehicleid] = 100;}
				if(VehicleModel==520||VehicleModel==476||VehicleModel==593||VehicleModel==553||VehicleModel==513||VehicleModel==512||VehicleModel==577||VehicleModel==592||VehicleModel==511||VehicleModel==539||VehicleModel==464||VehicleModel==519) { Fuel[vehicleid] = 100; }
				new speed = (floatround(Dis)*MULTIPLY_SPEED);

			  if( speed == 0 ){
					format(string,sizeof(string),"~B~Vehicle:~n~~w~%s~n~~B~Speed: ~G~%dm/h~n~~B~Fuel: ~W~%.1f~n~~B~Health: ~W~%.0f%",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[vehicleid],health/10);
				} else if( speed >= 1 && speed <= 60 ){
					format(string,sizeof(string),"~B~Vehicle:~n~~w~%s~n~~B~Speed: ~G~%dm/h~n~~B~Fuel: ~W~%.1f~n~~B~Health: ~W~%.0f%",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[vehicleid],health/10);
					Fuel[vehicleid] -= 0.01;
				} else if( speed >= 61 && speed <= 120 ){
					format(string,sizeof(string),"~B~Vehicle:~n~~w~%s~n~~B~Speed: ~Y~%dm/h~n~~B~Fuel: ~W~%.1f~n~~B~Health: ~W~%.0f%",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[vehicleid],health/10);
					Fuel[vehicleid] -= 0.02;
				} else {
					format(string,sizeof(string),"~B~Vehicle:~n~~w~%s~n~~B~Speed: ~R~%dm/h~n~~B~Fuel: ~W~%.1f~n~~B~Health: ~W~%.0f%",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[vehicleid],health/10);
					Fuel[vehicleid] -= 0.03;
				}

				black[i] = TextDrawCreate(641.000000, 436.000000,"_");
				TextDrawUseBox(black[i],1);
				TextDrawBoxColor(black[i],0xAA0000FF);
				TextDrawTextSize(black[i],-4.000000, 0.000000);
				TextDrawAlignment(black[i],0);
				TextDrawBackgroundColor(black[i],255);
				TextDrawFont(black[i],2);
				TextDrawLetterSize(black[i],0.500000, 1.200000);
				TextDrawColor(black[i],WHITE);
				TextDrawSetOutline(black[i],1);
				TextDrawSetProportional(black[i],1);
				TextDrawSetShadow(black[i],1);

				Speedom[i] = TextDrawCreate(642.000000, 437.000000,string);
				TextDrawUseBox(Speedom[i],1);
				TextDrawBoxColor(Speedom[i],0xAA0000FF);
				TextDrawTextSize(Speedom[i],-4.000000, 0.000000);
				TextDrawAlignment(Speedom[i],0);
				TextDrawBackgroundColor(Speedom[i],255);
				TextDrawFont(Speedom[i],2);
				TextDrawLetterSize(Speedom[i],0.500000, 1.200000);
				TextDrawColor(Speedom[i],WHITE);
				TextDrawSetOutline(Speedom[i],1);
				TextDrawSetProportional(Speedom[i],1);
				TextDrawSetShadow(Speedom[i],1);

				TextDrawShowForPlayer(i, black[i]);
				TextDrawShowForPlayer(i, Speedom[i]);
				OldCoordsX[i] = x; OldCoordsY[i] = y;
			} else { TextDrawDestroy(black[i]); TextDrawDestroy(Speedom[i]); }
		}
	}
	return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)