SA-MP Forums Archive
Requesting help with Entrance - 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)
+--- Thread: Requesting help with Entrance (/showthread.php?tid=510060)



Requesting help with Entrance - zohartrejx - 29.04.2014

Hello.
I have CvP 1.v2 working on and i have some bugs.

Can someone help me how to make Entrance, so when i step on it, it teleports me to some place and Interior?
I would really need some help
If you could help, i would be happy.
I will be ocmmending Everyone.

What i mean by this is that player sees where is entrance and when he steps on it, it changes Interior and Pos. After that theres one also inside so he can get out. Thanks.
REP+ Everyone who will try to help


Re: Requesting help with Entrance - JeaSon - 29.04.2014

if someone picked a pickup that you created for teleporting player to another interior or pos
use this
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup


Re: Requesting help with Entrance - Raaf - 29.04.2014

First, use CreatePickup. click here

Then use OnPlayerPickUpPickup what above is said. click here

If you need help, pm me your skype and I'll see what I can do for you.

Raaf


Re: Requesting help with Entrance - zohartrejx - 29.04.2014

Ty!


Re: Requesting help with Entrance - Xenforox - 29.04.2014

first do,
PHP код:
new pickup;//you can rename it to what you want) 
then:
PHP код:
//under OnGameModeinit
pickup(or whaterver you named it above) = CreatePickup(typeXYZ9.0);//set it to your need 
then do
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == pickup)
    {
        
SetPlayerPos(playeridXYZ);//the coords of the interior
        
SetPlayerInterior(playerid0);
    }
    return 
1;