/enter help - 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: /enter help (
/showthread.php?tid=200021)
/enter help -
Karl1195 - 17.12.2010
Hey guys i am doing a Death match server to learn just got about 1000 lines and i would like to make some interiors with /enter and /exit can some one tell me how and where to place it.. i got an idea about how to do it but not sure.
Re: /enter help -
Joe_ - 17.12.2010
Read up on Arrays, on the SA-MP Wiki, my custom /enter system uses arrays and bit manipulation (Bits sound a bit too advanced for you, but their not required), use a loop to loop through the size of the array you're storing all the doors in, then check if he's at the X,Y,Z location of each index, if he is, set him to that indexes, inside position, and vise versa.
Re: /enter help -
Karl1195 - 17.12.2010
Okay ill try thanks. Can you give me the link if you don't mind please?
Re: /enter help -
Joe_ - 17.12.2010
https://sampwiki.blast.hk/wiki/Scripting_Basics#Arrays
Re: /enter help -
Karl1195 - 17.12.2010
That doesn't really help i wanna do some thing like this but with /enter:
Код:
else if (PlayerToPointStripped(2, playerid, -2170.4067,635.3931,1052.3750, cx,cy,cz))
{
if(newkeys == KEY_WALK)
{
SetPlayerPos(playerid, 2488.4675,-1668.2709,329.6298);
GameTextForPlayer(playerid, "~w~The backroom",5000,1);
SetPlayerInterior(playerid,6);
SetPlayerFacingAngle(playerid, 0);
PlayerInfo[playerid][pInt] = 6;
}
}
else if (PlayerToPoint(5, playerid, 2488.1604,-1667.1577,329.6298))
{
if(newkeys == KEY_WALK)
{
SetPlayerPos(playerid, -2170.3489,637.5996,1052.3750);
GameTextForPlayer(playerid, "~g~The HQ",5000,1);
SetPlayerInterior(playerid,6);
PlayerInfo[playerid][pInt] = 6;
}