Script bug or SA:MP bug
#1

Hey

I was making my script compatible with SA:MP 0.3a RC10-1

When I suddenly discovered that when I open a menu, and select a stuff, I get a window with a black bar in the middle of it.
I made a video so it is better to explain.

VIDEO

http://www.xfire.com/video/1678c3/

Pawno Code:

/refuel command:

Код:
	if(strcmp("/refuel", cmdtext, true, 10) == 0)
	{
	  if(VehicleFuelAllowed(GetPlayerVehicleID(playerid)))
		{
		  if(GetPlayerState(playerid) == 2)
			{
	  		if(PlayerToPoint(8, playerid, 1942.3781,-1772.8646,13.6406) ||
	  		PlayerToPoint(8, playerid, -90.9795,-1168.9972,2.4223) ||
	  		PlayerToPoint(8, playerid, 70.4325,1218.8265,18.8120) ||
		  	PlayerToPoint(8, playerid, 609.7920,1697.8827,6.9922) ||
		  	PlayerToPoint(8, playerid, 617.5897,1686.8387,6.9922) ||
		  	PlayerToPoint(8, playerid, 2115.0081,920.6175,10.8203) ||
		  	PlayerToPoint(8, playerid, 2639.6003,1106.2504,10.8203) ||
		  	 	PlayerToPoint(8, playerid, 2202.5349,2474.5525,10.8203) ||
		  	PlayerToPoint(8, playerid, 1596.4072,2198.8689,10.8203) ||
		  	PlayerToPoint(8, playerid, -731.7610,2745.2327,47.2266) ||
		  	PlayerToPoint(8, playerid, -1328.3470,2677.3628,50.0625) ||
		  	PlayerToPoint(8, playerid, -1471.3751,1863.8956,32.6328) ||
		  	PlayerToPoint(8, playerid, -2410.0356,976.2238,45.4251) ||
		  	PlayerToPoint(8, playerid, 1381.8715,459.1237,20.3452) ||
		  	PlayerToPoint(8, playerid, -1605.6766,-2714.0964,48.5335) ||
		  	PlayerToPoint(8, playerid, 655.7526,-564.7766,16.3359) ||
				PlayerToPoint(8, playerid, -1670.6670,418.3373,7.1797) ||
				PlayerToPoint(8, playerid, -1681.2869,407.5908,7.1797) ||
		  	PlayerToPoint(8, playerid, 1004.0015,-937.5493,42.3281))
		  	{
   				TogglePlayerControllable(playerid, false);
  					ShowMenuForPlayer(RefuelMenu, playerid);
				}
				else
	  		{
	  			SendClientMessage(playerid, COLOR_RED,"You are not at a Fuel Station. Try closer if you are.");
	  		}
	  	}
	  	else
	  	{
	  		SendClientMessage(playerid, COLOR_RED,"You are not the driver of this vehicle.");
	  	}
 		}
 		else
 		{
 		  SendClientMessage(playerid, COLOR_RED,"You must be in a vehicle to use refuel.");
 		}
		return 1;
	}
Refuel menu Pawno:

Код:
	if(Current == RefuelMenu)
  {
    switch(row)
    {
      case 0: {TogglePlayerControllable(playerid, true);if(playermoney >= 10){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+10.0000;GivePlayerMoney(playerid, -10);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 10 liter fuel for $10,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $10,- dollars in cash to buy 10 liter fuel.");}}
      case 1: {TogglePlayerControllable(playerid, true);if(playermoney >= 20){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+20.0000;GivePlayerMoney(playerid, -20);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 20 liter fuel for $20,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $20,- dollars in cash to buy 20 liter fuel.");}}
      case 2: {TogglePlayerControllable(playerid, true);if(playermoney >= 40){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+40.0000;GivePlayerMoney(playerid, -40);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 40 liter fuel for $40,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $40,- dollars in cash to buy 40 liter fuel.");}}
      case 3: {TogglePlayerControllable(playerid, true);if(playermoney >= 60){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+60.0000;GivePlayerMoney(playerid, -60);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 60 liter fuel for $60,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $60,- dollars in cash to buy 60 liter fuel.");}}
			case 4: {TogglePlayerControllable(playerid, true);if(playermoney >= 80){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+80.0000;GivePlayerMoney(playerid, -80);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 80 liter fuel for $80,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $80,- dollars in cash to buy 80 liter fuel.");}}
			case 5: {TogglePlayerControllable(playerid, true);if(playermoney >= 100){VehicleFuel[vehicleid] = VehicleFuel[vehicleid]+100.0000;GivePlayerMoney(playerid, -100);SendClientMessage(playerid, COLOR_YELLOW,"You have successfully bought 100 liter fuel for $100,- dollars.");}else{SendClientMessage(playerid, COLOR_RED,"You need $100,- dollars in cash to buy 100 liter fuel.");}}
	    case 6: {TogglePlayerControllable(playerid, true);}
    }
  }
or pastebin:

http://pastebin.com/f7ed240b

Now, is this a bug of the script, or from SA:MP??

Well thank you anyway
Reply
#2

It looks like random textdraw who shows over your screen.

Btw, you can use IsPlayerInRangeOfPoint instead of PlayerToPoint
Reply
#3

Quote:

Btw, you can use IsPlayerInRangeOfPoint instead of PlayerToPoint Wink

pawn Код:
#define PlayerToPoint(%1,%2,%3,%4,%5) \
 IsPlayerInRangeOfPoint(%2,%1,%3,%4,%5)
Reply
#4

Quote:
Originally Posted by $ЂЯĢ
It looks like random textdraw who shows over your screen.

Btw, you can use IsPlayerInRangeOfPoint instead of PlayerToPoint
random textdraw I never made a random textdraw, not what looks like that, (big black textdraw)

so how can I fix it please
Reply
#5

srry, but It is really important

Can you please help me I just made a normal menu, with nothing special, and still is that bug
Reply
#6

blacksouls i have the same script, i have that problem not :P
Reply
#7

nvm, I fixed it

thanks anyway

/lock
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)