Help with /enter , /exit
#7

Quote:
Originally Posted by Weirdosport
pawn Код:
#include <a_samp>

new woozy;

public OnFilterScriptInit()
{
    woozy = CreatePickup(4, 23, 0.0, 0.0, 15.0);
    return 1;
}

public OnFilterScriptExit()
{
    DestroyPickup(woozy);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == woozy)
      {
      SetPlayerPos(playerid, -2180.2656,602.8268,35.1691);
      SendClientMessage(playerid, 0xFF00FFAA, "Welcome to Woozy's");
      }
    return 1;
}
This is a very basic script, that will spawn a pickup somewhere over the field in the center of the map. When you walk into the pickup it will take you to Woozy's. This script is just a guide, I do not recommend you use it, as it's very very basic, and Woozy's house is probably in an interior.

You need to change the "4" and "0.0, 0.0, 0.0" in the CreatePickup to suit your needs.

PS. Due to the use of "OnFilterscriptInit" and "OnFilterscriptExit" aswell as the use of "CreatePickup", this script can be loaded/unloaded while in game without causing problems. I also gave the pickup a name other than "pickup" or "pickup1" so it doesn't get confused with others. This name doesn't matter, so long as you use it consistently.
Thanks. I used
CreatePickup (1239, 2, -2180.2656,602.8268,35.1691);
Now the thing is I can't find OnFilterScriptInit() in the GF.pwn . Sorry if I am searching in the wrong place for that.
All I did now is create CreatePickup (1239, 2, -2180.2656,602.8268,35.1691); under OnGameModeInit().
What shell I do now cause I can't find OnFilterScriptInit().
Reply


Messages In This Thread
Help with /enter , /exit - by OcTeT - 15.03.2009, 16:46
Re: Help with /enter , /exit - by Weirdosport - 15.03.2009, 16:55
Re: Help with /enter , /exit - by OcTeT - 15.03.2009, 16:58
Re: Help with /enter , /exit - by OcTeT - 15.03.2009, 16:59
Re: Help with /enter , /exit - by OcTeT - 15.03.2009, 17:15
Re: Help with /enter , /exit - by Weirdosport - 15.03.2009, 17:29
Re: Help with /enter , /exit - by OcTeT - 15.03.2009, 17:44
Re: Help with /enter , /exit - by Weirdosport - 15.03.2009, 17:46
Re: Help with /enter , /exit - by OcTeT - 15.03.2009, 17:47
Re: Help with /enter , /exit - by Weirdosport - 15.03.2009, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)