SA-MP Forums Archive
How to make entrances - 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: How to make entrances (/showthread.php?tid=110518)



How to make entrances - Egypt1123 - 27.11.2009

Hey guys,

i have already had a look in search and could not find it

I want to make a entrance infront of a building and when someone walks into the 'I' sign the get teleported into the interior??

I have tried it but im kindof fail at advanced scripting =(

Thanks in advance


Re: How to make entrances - Rzzr - 27.11.2009

It is not that advanced.
Just make a pickup, and when someone picks up that pickup they get teleported to the interior.
I gotta go to school now, maybe I will help you some more later.


Re: How to make entrances - Naruto4 - 27.11.2009

Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2695.6880, -1704.6300, 11.8438)) // add your location
{
SetPlayerPos(playerid,0.0,0.0,10.0); // you loc
GameTextForPlayer(playerid,"Entered someting",5000,4); // if you want or you can put Sendclientmessage
}
or you can add
/enter
but i think this is better it does automaticly

cheers


Re: How to make entrances - Jay_ - 27.11.2009

There is no point in checking the distance from the player to the pickup, since he's not asking for a command, he's asking for an immediate teleport when he enters the pickup.

Use CreatePickup, and OnPlayerPickupPickup.




Re: How to make entrances - Egypt1123 - 28.11.2009

Quote:
Originally Posted by [HLF
Southclaw ]
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == pickupid //[pickup id made in OnGameModeInit: 'pickupname = Createpickup(...' and don't forget the 'new pickupname;']
  {
    SetPlayerPos(...
    SetPlayerInterior(...
  }
}
there and make the pickup with an ID if you don't know hoiw to do this then ask me

um could you explain the pickupid thing

Thanks so much you guys for your support


Re: How to make entrances - Egypt1123 - 30.11.2009

ok i think i get it, thanks