elevator pickup
#1

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
Reply
#2

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
Reply
#3

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:

Reply
#4

COME ON NO1?
Reply
#5

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

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;
}
Reply
#7

yes I was gonna say that too..
Reply
#8

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
Reply
#9

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 ?
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)