SA-MP Forums Archive
Buildings - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Buildings (/showthread.php?tid=141879)



Buildings - Tony1337 - 15.04.2010

Hey Everyone, I was wondering if someone could tell me or show me how to make it so you walk up to a door and pop up in a interior and then be able to exit it also. Thanks!


Re: Buildings - russo666 - 15.04.2010

You can do that with 'checkpoints'.


Re: Buildings - Noredine - 15.04.2010

Test did it, with Check Point.


Re: Buildings - Tony1337 - 15.04.2010

Alright, can you give me a example?


Re: Buildings - Noredine - 15.04.2010

Quote:
Originally Posted by Tony1337
Alright, can you give me a example?
pawn Code:
public OnPlayerSpawn(playerid)
{
  SetPlayerCheckpoint(playerid, X, Y, Z, 3.0);
  return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
  SetPlayerPos(playerid,X,Y,Z);
  printf("Player %i is now at the building checkpoint!",playerid);
  if (IsPlayerInCheckpoint(playerid))
  {
  SetPlayerPos(playerid,X,Y,Z);
  }
  return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
  printf("Player %i have left a building checkpoint!",playerid);
  return 1;
}
Enjoy !


Re: Buildings - Tony1337 - 15.04.2010

Alright thanks you but there is 2 problems.
1) Once your in the building you can't exit.
2) I can only make one because it would just take me to the same place.

can I solve these?



Re: Buildings - Thrarod - 15.04.2010

Use pickups, in cps you cant define chepoint id but in pickups you can so if (pickupid==Buil1) blahblahblah, search wiki!


Re: Buildings - Tony1337 - 15.04.2010

True, BUT When you use pickups there is also no way to make a exit?


Re: Buildings - Noredine - 16.04.2010

You can create check point in the building

For after the player go to the building for exit.

Or if you want just admin can exit it.

You create with a exception.

IfPlayerIsAdmin (Just Example)


Re: Buildings - Steven82 - 16.04.2010

eh......i kinda like the pickup methhood, very easy.