[STREAMER] Checkpoint teleporters to shops
#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


Messages In This Thread
[STREAMER] Checkpoint teleporters to shops - by Deroxi - 01.06.2016, 18:48
Re: [STREAMER] Checkpoint teleporters to shops - by Deroxi - 01.06.2016, 20:16
Re: [STREAMER] Checkpoint teleporters to shops - by justjamie - 01.06.2016, 20:40
Re: [STREAMER] Checkpoint teleporters to shops - by Deroxi - 01.06.2016, 20:43
Re: [STREAMER] Checkpoint teleporters to shops - by justjamie - 01.06.2016, 22:07
Re: [STREAMER] Checkpoint teleporters to shops - by Deroxi - 02.06.2016, 07:56
Re: [STREAMER] Checkpoint teleporters to shops - by xTURBOx - 02.06.2016, 08:50
Re: [STREAMER] Checkpoint teleporters to shops - by Nin9r - 02.06.2016, 08:59
Re: [STREAMER] Checkpoint teleporters to shops - by Deroxi - 02.06.2016, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)