SA-MP Forums Archive
Pickup help - 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: Pickup help (/showthread.php?tid=72557)



Pickup help - krisis32 - 09.04.2009

Why this dosnt work?
I can enter it.. but i dosnt see anything... i see nothing!
Код:
  if (pickupid == dmv) // Check that the picked up pickup id is the same as the id of the one we created
	{
		// It is
  new Float:a;
  new Float:b;
  new Float:c;
  new VehicleID;
  GetPlayerPos(playerid, a, b, c);
  SetPlayerPos(playerid,-1827.147338,7.207418,1061.143554);
  SetPlayerInterior(playerid,14);
  }
	return 1;
}



Re: Pickup help - 56avenue - 09.04.2009

What is the point of GetPlayerPos?


Re: Pickup help - SpiderPork - 09.04.2009

And VehicleID.


Re: Pickup help - Nero_3D - 09.04.2009

lol, I think that doesnt mind, and you need to use CreatePickup instead of AddStaticPickup


Re: Pickup help - krisis32 - 09.04.2009

the hole stuff is to enter house......


Re: Pickup help - Weirdosport - 09.04.2009

Use this:

pawn Код:
if (pickupid == dmv) // Check that the picked up pickup id is the same as the id of the one we created
    {
    // It is
    SetPlayerPos(playerid,-1827.147338,7.207418,1061.143554);
    SetPlayerInterior(playerid,14);
    }



Re: Pickup help - krisis32 - 09.04.2009

Quote:
Originally Posted by Weirdosport
Use this:

pawn Код:
if (pickupid == dmv) // Check that the picked up pickup id is the same as the id of the one we created
    {
    // It is
    SetPlayerPos(playerid,-1827.147338,7.207418,1061.143554);
    SetPlayerInterior(playerid,14);
    }
Thanks! It did work! Could any one helpme creating /exit command! Cuz i dunno if i can create a pickup in the interior... or maybe like other server.. when u goes at doors and press enter u exit the house!


Re: Pickup help - Weirdosport - 09.04.2009

The thing you describe with the enter would require a bit more scripting knowledge (OnPlayerKeyStateChange) etc etc.

To keep it simple, you can use /save while in the interior. and Yes pickups do work in interiors without additional coding. Simply making another pickup with a different name and moify the script you have below with interior 0, and a new set of co-ords.

Note don't use the co-ordinates of the outside pickup or you'll "bounce" from the inside to the outside and back again!