Entering Buildings
#3

pawn Code:
if(strcmp(cmd, "/enter", true) == 0)  // Checks if the string "cmd" is equal to "/enter".
{
  if(PlayerToPoint(5.0,playerid, x,y,z) || PlayerToPoint(5.0,playerid, x,y,z) || PlayerToPoint(5.0,playerid, x,y,z))   // A custom function to get the distance between a player and a coordinate.
  {
    SetPlayerPos(playerid, interior:x,interior:y,interior:z); // Sets a players position because he is close enough to the above coordinate
  }
  else
  {
    SendClientMessage(playerid, COLOR_BLUE,"You must be at a house entrance to enter.");  // Sends the player a message to inform them they are not close enough
  }
  return 1;  // Tells the script to end the function here
}
Reply


Messages In This Thread
Entering Buildings - by Sal_Kings - 03.08.2009, 17:32
Re: Entering Buildings - by xCoder - 03.08.2009, 17:44
Re: Entering Buildings - by WrathOfGenesis - 03.08.2009, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)