SA-MP Forums Archive
elevator pickup - 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: elevator pickup (/showthread.php?tid=84227)



elevator pickup - Criss_Angel - 29.06.2009

someone deleted my old post so...

I made a pickup which is kinda like a elevator when someone enters it they get tp to another place but its not working when i enter it nothing happens

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (1318 == value) // Check that the picked up pickup id is the same as the id of the one we created
	{
  SetPlayerPos(playerid,1616.4656,-2249.4036,-2.8516);

	return 1;
}
i have made a pick up which is called value

Код:
value = CreatePickup(1318,19,1589.4851,-2286.0991,-1.2050);
so what did i do wrong


Re: elevator pickup - Tannz0rz - 29.06.2009

Change
Код:
if (1318 == value) // Check that the picked up pickup id is the same as the id of the one we created
To
Код:
if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created



Re: elevator pickup - Criss_Angel - 29.06.2009

Quote:
Originally Posted by Tannz0rz
Change
Код:
if (1318 == value) // Check that the picked up pickup id is the same as the id of the one we created
To
Код:
if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created
ok,i tryed but still i wont be tp'ed now what?

here:




Re: elevator pickup - Criss_Angel - 29.06.2009

COME ON NO1?


Re: elevator pickup - Ignas1337 - 29.06.2009

umm, I beleave the type is wrong. set it to pickupable and respawn after some time. check the wiki


Re: elevator pickup - Tannz0rz - 29.06.2009

Well, you also forgot to close your 'if' statement, try this:
Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created
	{
        SetPlayerPos(playerid,1616.4656,-2249.4036,-2.8516);
    }
	return 1;
}



Re: elevator pickup - Ignas1337 - 29.06.2009

yes I was gonna say that too..


Re: elevator pickup - Criss_Angel - 29.06.2009

Quote:
Originally Posted by Tannz0rz
Well, you also forgot to close your 'if' statement, try this:
Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created
	{
       SetPlayerPos(playerid,1616.4656,-2249.4036,-2.8516);
    }
	return 1;
}
Yes, i have done all the things but still nothing


Re: elevator pickup - Criss_Angel - 30.06.2009

Quote:
Originally Posted by Criss_Angel
Quote:
Originally Posted by Tannz0rz
Well, you also forgot to close your 'if' statement, try this:
Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created
	{
       SetPlayerPos(playerid,1616.4656,-2249.4036,-2.8516);
    }
	return 1;
}
Yes, i have done all the things but still nothing
So nobody knows ?


Re: elevator pickup - ACERS - 30.06.2009

I got it to work...

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if (pickupid == value) // Check that the picked up pickup id is the same as the id of the one we created
	{
        SetPlayerPos(playerid,1616.4656,-2249.4036,-2.8516);
    }
	return 1;
}
I just changed the Pickup to PickUp... Works fine