Playertopoint errors
#10

Quote:
Originally Posted by dice7
Omg, not function calls, functions!
This

pawn Код:
PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
{
  new Float:oldpos[3], Float:temppos[3];
  GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
  temppos[0] = (oldpos[0] -X);
  temppos[1] = (oldpos[1] -Y);
  temppos[2] = (oldpos[2] -Z);
  if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
  {
    return true;
  }
  return false;
}
listen, i haven't commented that, i commented this:
Код:
else if(PlayerToPoint(2, i,503.2812,-11.7610,1000.6797))
			{//Alahambra HQ enterance
				if (PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12)
        	{
					GameTextForPlayer(i, "~w~Type ~g~/enterhq ~w~ to enter your gang HQ", 5000, 3);
				}
				else
				{
				  GameTextForPlayer(i, "~r~Blood Access Only", 5000, 3);
				}
			}
Quote:
Originally Posted by Virtual1ty
i think its better for you update to 0.3a and use the IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
I'm using 0.3 compiler, and im not really bothered to go through my 30k script changing everything.
Reply


Messages In This Thread
Playertopoint errors - by (Jeff) - 15.11.2009, 15:31
Re: Playertopoint errors - by dice7 - 15.11.2009, 15:33
Re: Playertopoint errors - by (Jeff) - 15.11.2009, 15:34
Re: Playertopoint errors - by dice7 - 15.11.2009, 15:35
Re: Playertopoint errors - by (Jeff) - 15.11.2009, 15:36
Re: Playertopoint errors - by dice7 - 15.11.2009, 15:39
Re: Playertopoint errors - by (Jeff) - 15.11.2009, 15:40
Re: Playertopoint errors - by dice7 - 15.11.2009, 15:44
Re: Playertopoint errors - by Virtual1ty - 15.11.2009, 15:47
Re: Playertopoint errors - by (Jeff) - 15.11.2009, 15:49

Forum Jump:


Users browsing this thread: 4 Guest(s)