SA-MP Forums Archive
how to make 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make entrance ? (/showthread.php?tid=263522)



how to make entrance ? - RealMan2 - 22.06.2011

how to make entrance ?
LSPD
24/7
Cityhall
ammu
...


Re: how to make entrance ? - Lorenc_ - 22.06.2011

What do you mean?


Re: how to make entrance ? - xRyder - 22.06.2011

You just have to teleport player when he enters command (/enter?).

Something like:
pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, Float:R, Float:X, Float:Y, Float:Y))
        {
            SetPlayerPos(playerid, Float:SomeX, Float:SomeY, Float:someZ);
        }
        return 1;
    }



Re : how to make entrance ? - RealMan2 - 22.06.2011

i don't understand you !


Re : how to make entrance ? - RealMan2 - 22.06.2011

i need help please


Re: how to make entrance ? - xRyder - 22.06.2011

Let's assume that player want to enter PD station in LS. So he's stands in front of PD doors and writes a command like /enter. Now, that code I gave you is just an simple example of that enter command.

pawn Код:
if (strcmp("/enter", cmdtext, true) == 0)
This will check did the player wrote /enter command.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Float:R, Float:X, Float:Y, Float:Z))
If the command has been called it will check if player is in front of PD.
You should replace Float:R(ange), Float:X, Float:Y and Float:Z with your range and coordinates.

pawn Код:
SetPlayerPos(playerid, Float:SomeX, Float:SomeY, Float:someZ);
And then if the player is in front of a PD it will set his position wherever you want.
Replace Float:SomeX, Float:SomeY, FloatomeZ with your coordinates where you want to put player.


Re : how to make entrance ? - RealMan2 - 22.06.2011

is there FS xreate enterance , i don't know how to script


Re: Re : how to make entrance ? - Wesley221 - 22.06.2011

Quote:
Originally Posted by RealMan2
Посмотреть сообщение
is there FS xreate enterance , i don't know how to script
Then learn to.
https://sampwiki.blast.hk/wiki/Category:..._Documentation


Re: Re : how to make entrance ? - PCheriyan007 - 22.06.2011

Quote:
Originally Posted by RealMan2
Посмотреть сообщение
is there FS xreate enterance , i don't know how to script
:facepalm:


Re : how to make entrance ? - RealMan2 - 22.06.2011

i can't I need now !!!!!! :3