[STREAMER] Checkpoint teleporters to shops
#1

Hey there chaps!

So I want to make checkpoints for pretty much every shop in LS. I know how to make teleporters using Streamer. But my question is: I also want multiple teleporters for 1 shop (Cause there is more than 1 burgershot in LS). But I dont really know where to start. I hope you guys could help me out
Reply
#2

Anyone?
Reply
#3

Wrong section.
This section is meant for scripts you wrote and people can help you fix the errors in it.
Reply
#4

https://gyazo.com/6c5733b720849a30857816a48cccdd75
"Discussion and help related to CREATING scripts for SA-MP"
Reply
#5

Yes, HELP.
Not asking if we can write a whole script for u lol.
Reply
#6

I wasnt asking for an entire script, i'd like to do that myself. All asked for was where i have to start.
Read before b*tching pls
Reply
#7

He wasn't asking for code, he was just asking how to do it

ONTOPIC: i think it is done by changing virtual world,
i mean like
1st BS = teleports to BS interior and virtual world 1
2nd BS = teleports to BS interior and virtual world 2
Reply
#8

Make a command like /enter and another one like exit.
There you have to verify if the player is in a position of any burger shot. For example, use PlayerToPoint or IsPlayerInRangeOfPoint to check it.
If the player is in a positon you will use SetPlayerPos and SetPlayerInterior (pos + interior of burger shot ). Then, you have to use a variable like InBurger[playerid] = idburger; to get different values when a player enter in a burger shot. When you make /exit, you will do the same like /enter just you have to verify InBurger[playerid] == 1, 2 etc to put different positions of exit.

Example to put in /enter command:

Код HTML:
if (PlayerToPoint(3.0, playerid,x,y,z)) // position 1 of burger shot
			{
			    SetPlayerInterior(playerid,0); // Burger Shot Interior ID
				SetPlayerPos(playerid,x,y,z); // Burger Shot Interior Pos
                            InBurger[playerid] = 1;
			}
			else if (PlayerToPoint(6.0, playerid,x,y,z)) // position 2 of burger shot
			{
			    SetPlayerInterior(playerid,0); // Burger Shot Interior ID
				SetPlayerPos(playerid,x,y,z); // Burger Shot Interior Pos
                            InBurger[playerid] = 2;
			}
Example to put in /exit command:

Код HTML:
if (PlayerToPoint(3.0, playerid,x,y,z)) // position of exit from burger
			{
                            if(InBurger[playerid] == 1)
                           {
			       SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,x,y,z); // Burger Shot Exit Pos 1 ( pos 1 from /enter command - playertopoint)
                           }
                           if(InBurger[playerid] == 2)
                           {
			       SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,x,y,z); // Burger Shot Exit Pos 2 ( pos 2 from /enter command - playertopoint)
                           }
			}
Reply
#9

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
He wasn't asking for code, he was just asking how to do it

ONTOPIC: i think it is done by changing virtual world,
i mean like
1st BS = teleports to BS interior and virtual world 1
2nd BS = teleports to BS interior and virtual world 2
That will mean i have to define every bs in LS with a different name?

Quote:
Originally Posted by Nin9r
Посмотреть сообщение
Make a command like /enter and another one like exit.
There you have to verify if the player is in a position of any burger shot. For example, use PlayerToPoint or IsPlayerInRangeOfPoint to check it.
If the player is in a positon you will use SetPlayerPos and SetPlayerInterior (pos + interior of burger shot ). Then, you have to use a variable like InBurger[playerid] = idburger; to get different values when a player enter in a burger shot. When you make /exit, you will do the same like /enter just you have to verify InBurger[playerid] == 1, 2 etc to put different positions of exit.

Example to put in /enter command:

Код HTML:
if (PlayerToPoint(3.0, playerid,x,y,z)) // position 1 of burger shot
			{
			    SetPlayerInterior(playerid,0); // Burger Shot Interior ID
				SetPlayerPos(playerid,x,y,z); // Burger Shot Interior Pos
                            InBurger[playerid] = 1;
			}
			else if (PlayerToPoint(6.0, playerid,x,y,z)) // position 2 of burger shot
			{
			    SetPlayerInterior(playerid,0); // Burger Shot Interior ID
				SetPlayerPos(playerid,x,y,z); // Burger Shot Interior Pos
                            InBurger[playerid] = 2;
			}
Example to put in /exit command:

Код HTML:
if (PlayerToPoint(3.0, playerid,x,y,z)) // position of exit from burger
			{
                            if(InBurger[playerid] == 1)
                           {
			       SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,x,y,z); // Burger Shot Exit Pos 1 ( pos 1 from /enter command - playertopoint)
                           }
                           if(InBurger[playerid] == 2)
                           {
			       SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,x,y,z); // Burger Shot Exit Pos 2 ( pos 2 from /enter command - playertopoint)
                           }
			}
Hmm, I'm not a big fan of the /enter command. However, i will keep this in mind if I won't succeed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)