Pickup Teleports - Return To Location
#1

Okay well, I have scripted up a pickup which teleports me to an interior and there is one problem.

So I am in the interior and when I exit, I get teleported to the ORIGINAL location.

This is my script:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

new ammu1;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" My Teleports");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" SWIFT DRIFT");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	ammu1 = CreatePickup(1318,23,-2398.0510,-575.4337,132.3125);

	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == ammu1)
{
GameTextForPlayer(playerid,"~r~Ammunation", 6000,1);
SetPlayerPos(playerid, 286.800994,-82.547599,1001.515625);
SetPlayerInterior(playerid, 4);
}
return 1;
}
In this script I set up a teleport to Ammunation, and when I exit Ammunation I get sent to a different location then where I inserted the pickup.

If anyone could help, that'd be great!

Regards,
Swift.
Reply


Messages In This Thread
Pickup Teleports - Return To Location - by Swiftyy - 11.10.2013, 04:55
Re: Pickup Teleports - Return To Location - by Swiftyy - 11.10.2013, 23:07
Re: Pickup Teleports - Return To Location - by xVIP3Rx - 11.10.2013, 23:14
Re: Pickup Teleports - Return To Location - by Swiftyy - 11.10.2013, 23:17
Re: Pickup Teleports - Return To Location - by xVIP3Rx - 11.10.2013, 23:36
Re: Pickup Teleports - Return To Location - by Swiftyy - 11.10.2013, 23:48
Re: Pickup Teleports - Return To Location - by Threshold - 12.10.2013, 03:24
Re: Pickup Teleports - Return To Location - by Swiftyy - 12.10.2013, 04:35
Re: Pickup Teleports - Return To Location - by Tuntun - 12.10.2013, 05:14

Forum Jump:


Users browsing this thread: 1 Guest(s)