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.