Important !!
#1

One from my Important Important Important Important problem
How to add an interior for any buliding ??
Reply
#2

Use IsPlayerInRangeOfPoint in a /enter cmd.
If they are in range use SetPlayerPos and SetPlayerInterior.
Reply
#3

lol, Thank You
but there will be many buliding and one command can you give me an example of two bulidings please
Reply
#4

Код:
CMD:enter(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z)) 
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	else if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z))
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	else if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z))
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	return 1;
}
This code would only work if you have ZCMD, but it gives you a example how you could do it if you use a different command processor.

You do still have to fill in the values.
Reply
#5

Use "else if" if you want make /enter command
But you can create pickup infront of building and teleport player into interiors when player picks up pickup
Or you can use this include
https://sampforum.blast.hk/showthread.php?tid=289660
Reply
#6

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
Код:
CMD:enter(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z)) 
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	else if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z))
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	else if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z))
	{
		SetPlayerPos(playerid, Float:x, Float:y, Float:z);
		SetPlayerInterior(playerid, interiorid);
	}
	return 1;
}
This code would only work if you have ZCMD, but it gives you a example how you could do it if you use a different command processor.

You do still have to fill in the values.
Okai i am using ZCMD but how to get the PlayerPos inside the buliding ??
Reply
#7

Quote:
Originally Posted by M4D
Посмотреть сообщение
Use "else if" if you want make /enter command
But you can create pickup infront of building and teleport player into interiors when player picks up pickup
Or you can use this include
https://sampforum.blast.hk/showthread.php?tid=289660
Th problem still how to get the pos of the player inside the buliding ??
Reply
#8

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
Okai i am using ZCMD but how to get the PlayerPos inside the buliding ??
http://weedarr.wikidot.com/interior
The third column shows the position of the Interior.
The second column shows the interior ID you would fill in at
Код:
SetPlayerInterior(playerid, interiorid);
You can fill in that data and test it out, if you want a different position in that interior go stand on the spot and use /save (Built-in samp cmd). The XYZ will be saved to a file in your GTA User files

EDIT: Here is another list but without pictures. https://sampwiki.blast.hk/wiki/InteriorIDs
Reply
#9

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
http://weedarr.wikidot.com/interior
The third column shows the position of the Interior.
The second column shows the interior ID you would fill in at
Код:
SetPlayerInterior(playerid, interiorid);
You can fill in that data and test it out, if you want a different position in that interior go stand on the spot and use /save (Built-in samp cmd). The XYZ will be saved to a file in your GTA User files

EDIT: Here is another list but without pictures. https://sampwiki.blast.hk/wiki/InteriorIDs
the problem with this
PHP код:
SetPlayerPos(playeridFloat:xFloat:yFloat:z); 
Reply
#10

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
the problem with this
PHP код:
SetPlayerPos(playeridFloat:xFloat:yFloat:z); 
If you want this interior

it would be
Код:
SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
SetPlayerInterior(playerid,17);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)