05.01.2017, 11:46
(
Последний раз редактировалось CutX; 05.01.2017 в 14:00.
)
Quote:
Hello Everyone!
I Need Some Script To help me to create a shop with pickup I already create one but it teleport me over and over so i need a stable script to help me with creating dynamic pickup that teleport me to the shop and When i enter the shop another one teleport me to outside Like CnR Servers |
http://webcache.******usercontent.co...PvNYerUeGZp7gG
PHP код:
/**
* <summary>
* example:
* accessing interiors using pickups.
*
* We will be using the streamer plugin by Incognito
* Streamer: https://github.com/samp-incognito/samp-s...6.46257924
* </summary>
*/
#include <a_samp>
#include <streamer>
main(){}
enum
{
CLK_BELL_ENTER=1, //we have to start at 1 (unlike default 0)
CLK_BELL_EXIT //since pickup's don't start at 0 but 1
}
public OnGameModeInit()
{
//im disabling the vanilla (yellow cone) pickups here
DisableInteriorEnterExits();
//take note, that the order in which we
//create the pickups is !essential! here,
//our way of determining which pickup we're
//dealing with later on depends on it
CreateDynamicPickup(19132, 1, 928.231933, -1352.936157, 13.343750);//this will get pickupid 1, e.g CLK_BELL_ENTER
CreateDynamicPickup(19132, 1, 364.994293, -11.147426, 1001.851562);//this 2 and so on...
return 1;
}
public OnPlayerSpawn(playerid)
{
//for this example, you'll get spawned right in
//front of the shop so you don't have to search
SetPlayerPos(playerid, 914.7666,-1352.5599,13.3765);
return 1;
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
switch(pickupid) //'switching' through all the id's, better than if-if else
{
case CLK_BELL_ENTER://our enter pickup
{
//actually moving the player inside...
SetPlayerInterior(playerid, 9);
SetPlayerVirtualWorld(playerid,6);
SetPlayerPos(playerid, 364.8642,-8.6897,1001.8516);
SetPlayerFacingAngle(playerid,357.55);
}
case CLK_BELL_EXIT://and the exit one
{
//aaaand outside
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerPos(playerid, 924.7666,-1352.5599,13.3765);
}
}
return 1;
}