Help With Fuel Display
#1

Im kind of a Nub Scripter and need some help

I have a Chuck of code that I want to change
This is from the SAGC Roleplay GM
I want to make the Text Stop Flashing for the Fuel %
I know it is caused by the Style 5 Text
But When i Change it to Style 4 It Changes the position of the Text from at the bottom Centre to the Top Centre
If you can help me out by telling me how to Change the position or can Make a Different Looking Fuel gague
that would be awesome

Here is the chunck of code
Код:
  			if(ShowFuel[i] && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  			{
  			  new form[128];
  				new vehicle = GetPlayerVehicleID(i);
  				if(!OutOfFuel[i])
  				{
	  				if(Fuel[vehicle] <= 10)
	  				{
	  				  if(EngineStatus[vehicle])
	  				  {
	  	  					format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine running~n~~w~Fuel:~g~ %d%~n~~r~Low Fuel",Fuel[vehicle]);
		  					GameTextForPlayer(i,form,99999999999,4);
	  				  }
	  				  else
	  				  {
	  	  					format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine not running~n~~w~Fuel:~g~ %d%~n~~r~Low Fuel",Fuel[vehicle]);
		  					GameTextForPlayer(i,form,99999999999,5);
	  				  }
	  				}
	 					else
	 					{
	 					  if(EngineStatus[vehicle])
	 					  {
		 						format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine running~n~~w~Fuel:~g~ %d%",Fuel[vehicle]);
		 						GameTextForPlayer(i,form,99999999999,5);
	 						}
	 						else
	 						{
	 							format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine not running~n~~w~Fuel:~g~ %d%",Fuel[vehicle]);
		 						GameTextForPlayer(i,form,99999999999,5);
	 						}
	 					}
 					}
 				}
Reply
#2

This is what i had before
Код:
if(ShowFuel[i] && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  			{
  			  new form[128];
  				new vehicle = GetPlayerVehicleID(i);
  				if(!OutOfFuel[i])
  				{
	  				if(Fuel[vehicle] <= 10)
	  				{
	  				  if(EngineStatus[vehicle])
	  				  {
	  	  					format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine running~n~~w~Fuel:~g~ %d%~n~~r~Low Fuel",Fuel[vehicle]);
		  					GameTextForPlayer(i,form,99999999999,4);
	  				  }
	  				  else
	  				  {
	  	  					format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine not running~n~~w~Fuel:~g~ %d%~n~~r~Low Fuel",Fuel[vehicle]);
		  					GameTextForPlayer(i,form,99999999999,5);
	  				  }
	  				}
	 					else
	 					{
	 					  if(EngineStatus[vehicle])
	 					  {
		 						format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine running~n~~w~Fuel:~g~ %d%",Fuel[vehicle]);
		 						GameTextForPlayer(i,form,99999999999,5);
	 						}
	 						else
	 						{
	 							format(form, sizeof(form), "~w~~n~~n~~n~~n~~n~~n~~y~Engine not running~n~~w~Fuel:~g~ %d%",Fuel[vehicle]);
		 						GameTextForPlayer(i,form,99999999999,5);
	 						}
	 					}
 					}
 				}
I tried to replace it with this
Код:
  			if(ShowFuel[i] && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  			{
  				new vehicle = GetPlayerVehicleID(i);
  				if(!OutOfFuel[i])
  				{
	  				if(Fuel[vehicle] <= 10)
	  				{
	  				  if(EngineStatus[vehicle])
	  				  {
    				 			Textdraw0 = TextDrawCreate(519.000000,385.000000,"Engine Running ~n~ Fuel:Low Fuel",Fuel[vehicle]);
								TextDrawAlignment(Textdraw0,2);
								TextDrawBackgroundColor(Textdraw0,0x000000ff);
								TextDrawFont(Textdraw0,1);
								TextDrawLetterSize(Textdraw0,0.599999,2.000000);
								TextDrawColor(Textdraw0,0xff0000cc);
								TextDrawSetOutline(Textdraw0,1);
								TextDrawSetProportional(Textdraw0,1);
								TextDrawSetShadow(Textdraw0,1);
	  				  }
	  				  else
	  				  {
								Textdraw1 = TextDrawCreate(519.000000,385.000000,"Engine Not Running ~n~ Fuel:Low Fuel",Fuel[vehicle]);
								TextDrawAlignment(Textdraw1,2);
								TextDrawBackgroundColor(Textdraw1,0x000000ff);
								TextDrawFont(Textdraw1,1);
								TextDrawLetterSize(Textdraw1,0.599999,2.000000);
								TextDrawColor(Textdraw1,0xff0000cc);
								TextDrawSetOutline(Textdraw1,1);
								TextDrawSetProportional(Textdraw1,1);
								TextDrawSetShadow(Textdraw1,1);
	  				  }
	  				}
	 					else
	 					{
	 					  if(EngineStatus[vehicle])
	 					  {
								Textdraw2 = TextDrawCreate(519.000000,385.000000,"Engine Running ~n~ Fuel:",Fuel[vehicle]);
								TextDrawAlignment(Textdraw2,2);
								TextDrawBackgroundColor(Textdraw2,0x000000ff);
								TextDrawFont(Textdraw2,1);
								TextDrawLetterSize(Textdraw2,0.599999,2.000000);
								TextDrawColor(Textdraw2,0xff0000cc);
								TextDrawSetOutline(Textdraw2,1);
								TextDrawSetProportional(Textdraw2,1);
								TextDrawSetShadow(Textdraw2,1);
	 						}
	 						else
	 						{
								Textdraw3 = TextDrawCreate(519.000000,385.000000,"Engine Not Running ~n~ Fuel:",Fuel[vehicle]);
								TextDrawAlignment(Textdraw3,2);
								TextDrawBackgroundColor(Textdraw3,0x000000ff);
								TextDrawFont(Textdraw3,1);
								TextDrawLetterSize(Textdraw3,0.599999,2.000000);
								TextDrawColor(Textdraw3,0xff0000cc);
								TextDrawSetOutline(Textdraw3,1);
								TextDrawSetProportional(Textdraw3,1);
								TextDrawSetShadow(Textdraw3,1);
	 						}
	 					}
 					}
 				}
Why wont it work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)