[HELP] I just get an error when I try to do this...
#3

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;
}
also ..

pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
{
    if(PlayerToPoint(5.0, playerid, 1568.5195,-1690.6931,5.8906))
    {
        SetPlayerPos(playerid, 615.2851,-124.2390,997.6350);
        SetPlayerInterior(playerid, 3);
        return 1;
    }
}
Reply


Messages In This Thread
[HELP] I just get an error when I try to do this... - by FreddeN - 26.05.2009, 21:40
Re: [HELP] I just get an error when I try to do this... - by miokie - 26.05.2009, 21:43
Re: [HELP] I just get an error when I try to do this... - by woot - 26.05.2009, 22:25
Re: [HELP] I just get an error when I try to do this... - by Anthony_Brassi - 03.09.2009, 01:07

Forum Jump:


Users browsing this thread: 2 Guest(s)