How to create a marker?
#3

Quote:
Originally Posted by MrXavier
Its real simple like this for instance....

with the defines/forwards
Код:
new ENTER;
new EXIT;
Under OnGameModeInit
Код:
ENTER = CreatePickup(ICON ID,TYPE,xcoordinate,ycoordinate,zcoordinate, virworld);
EXIT = CreatePickup(xcoordinate,ycoordinate,zcoordinate);
Then make a category like this
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == ENTER)
  {
	SetPlayerPos(playerid,xcoordinate,ycoordinate,zcoordinate);
	SetPlayerInterior(playerid,INTERIOR ID);
	}
	
	if(pickupid == EXIT)
	{
	SetPlayerPos(playerid,xcoordinate,ycoordinate,zcoordinate);
	SetPlayerInterior(playerid,0);
	}
	return 1;
}
You can use whatever term you want. I opted for it to be called enter/exit. If you want, tell me where you want the icon, and what interior you want to go to. I will script it for ya
You're public OnPlayerPickUpPickup(playerid, pickupid) isnt correct, If you are going to use 2 or more pickups you have to change the line to "else if" This is the fixed code:

Код:
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == ENTER)
  {
	SetPlayerPos(playerid,xcoordinate,ycoordinate,zcoordinate);
	SetPlayerInterior(playerid,INTERIOR ID);
	}
	
	else if(pickupid == EXIT)
	{
	SetPlayerPos(playerid,xcoordinate,ycoordinate,zcoordinate);
	SetPlayerInterior(playerid,0);
	}
	return 1;
}
Reply


Messages In This Thread
How to create a marker? - by Angelo94 - 06.11.2009, 21:42
Re: How to create a marker? - by MrXavier - 06.11.2009, 21:51
Re: How to create a marker? - by Eazy_Efolife - 06.11.2009, 22:18
Re: How to create a marker? - by Daren_Jacobson - 07.11.2009, 00:02
Re: How to create a marker? - by saiberfun - 07.11.2009, 00:06
Re: How to create a marker? - by Daren_Jacobson - 07.11.2009, 02:14
Re: How to create a marker? - by Eazy_Efolife - 07.11.2009, 02:16
Re: How to create a marker? - by Angelo94 - 07.11.2009, 06:50
Re: How to create a marker? - by dice7 - 07.11.2009, 09:30
Re: How to create a marker? - by Angelo94 - 07.11.2009, 10:05

Forum Jump:


Users browsing this thread: 1 Guest(s)