Bug of checking position?
#1

Код:
			if (!PlayerToPoint(5.0, playerid,-28.2725,-89.9479,1003.5469))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Sa ei ole 24-7 kohas, et rццvida!"); // Unity pood
				return 1;
			}
			else if(!PlayerToPoint(5.0, playerid,-23.4549,-55.6300,1003.5469))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Sa ei ole 24-7 kohas, et rццvida!"); // Commite pood
				return 1;
			}
			else if(!PlayerToPoint(5.0, playerid,-28.2130,-89.9546,1003.5469))
			{
			  SendClientMessage(playerid, COLOR_GRAD2, "Sa ei ole 24-7 kohas, et rццvida!"); // Vinewood pood
				return 1;
			}
			else if(!PlayerToPoint(5.0, playerid,373.7992,-67.4014,1001.5078))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Sa ei ole 24-7 kohas, et rццvida!"); // Vinewood hamburger
				return 1;
			}
I'm at Unity 24/7 and typing /robshop, then says still "Sa ei ole 24-7 kohas, et rццvida!" (You are not at 24-7 to robbing shop)
Reply
#2

Well are you sure the positions are the same as the checkpoints? You are clearly not on the position..
Reply
#3

Delete the '!' before PlayerToPoint
Reply
#4

Quote:
Originally Posted by Chuck_Taylor
Delete the '!' before PlayerToPoint
Lol.

So when he _is_ at 24/7 and does /robshop, he gets message that his not at 24/7..

EDIT: So he can rob 24/7 everywhere else than at that position.
Reply
#5

Usage: IsPlayerInRangeOfPoint
Reply
#6

i have fixed, but location is wrong...

Код:
if(PlayerToPoint(25.0, playerid,-28.2725,-89.9479,1003.5469))
			{
        asukohtpood[playerid] = 1; // Unity pood
			}
			else if(PlayerToPoint(25.0, playerid,-23.4549,-55.6300,1003.5469))
			{
				asukohtpood[playerid] = 2; // Commite pood
			}
			else if(PlayerToPoint(25.0, playerid,-28.2130,-89.9546,1003.5469))
			{
			  asukohtpood[playerid] = 3; // Vinewood pood
			}
			else if(PlayerToPoint(25.0, playerid,373.7992,-67.4014,1001.5078))
			{
				asukohtpood[playerid] = 4; // Vinewood hamburger
			}
and

Код:
new poodnimi[128];
				if(asukohtpood[playerid] == 1)
				{
				  poodnimi = "Unity pood";
				}
				else if(asukohtpood[playerid] == 2)
				{
				  poodnimi = "Commite pood";
				}
				else if(asukohtpood[playerid] == 3)
				{
				  poodnimi = "Vinewood pood";
				}
				else if(asukohtpood[playerid] == 4)
				{
				  poodnimi = "Vinewood hamburger";
				}
				else
				{
				  poodnimi = "Teadmata";
				}
I rob Vinewood shop, then police shows it Unity shop, must be Vinewood shop
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)