How to create ?
#1

[ame]http://www.youtube.com/watch?v=ndY8pserDlY&feature=player_embedded[/ame]

How to do this "arrow" and through it to go into a room or decor. Please explain to me is very important ..
Reply
#2

its called int, it depends on your script if its dynamic and can be added IG with a command or if you need to script it in.
Reply
#3

https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerInterior
Reply
#4

Using CreatePickup function, SetPlayerInterior function and OnPlayerPickUpPickup callback!

pawn Код:
new
    tp_pickup
;

public OnGameModeInit() /* or onfilterscriptinit if it's a filterscript */
{
    tp_pickup = CreatePickup( 1318, 23, Float:X, Float:Y, Float:Z, virtualworld = 0 );
    /* 1318 - white arrow model */
    return ( 1 );
}

public OnPlayerPickUpPickup( playerid, pickupid )
{
    if ( pickupid == tp_pickup ) /* if he enteres the arrow */
    {
        SetPlayerPos( playerid, Float:x, Float:y, Float:z ); /* teleport him */
        SetPlayerInterior( playerid, interiorid ); /* set his interior */
    }
    return ( 1 );
}
Reply
#5

You need this on "news"
This Defines Your Pickup.
PHP код:
new pickup1
Under OnGameModeInit:
PHP код:
pickup1 CreatePickup(modeltypeFloat:XFloat:YFloat:ZVirtualworld); 
You go in any server and type /save [text] And Copy X, Y, Z from it, virtual world is mostly 0
Here is an example:
PHP код:
pickup1 CreatePickup(1239192116.7874, -1787.998513.55470); 
Go on: http://weedarr.wikidot.com/pickups to see pickups

Now when you create arrow where you want, to use it to enter somewhere or teleport somewhere use this:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid
That is called when player picks up any pickup you made.

Then type this.
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
   if(
pickupid == pickup1)
   {
      
SetPlayerPos(playerid,Float:x,Float:y,Float:z);
      return 
1;
      } 
That is when player picks up the pickup "pickup1" we made in OnGameModeInit

On SetPlayerPos you can put any location to enter, or if you want him to be in interior use this:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
   if(
pickupid == pickup1)
   {
      
SetPlayerPos(playerid,Float:x,Float:y,Float:z);
          
SetPlayerInterior(playeridinteriorid);
      return 
1;
      } 
Interiors at: http://weedarr.wikidot.com/interior

LOL while i was typing explanations and all 3 answered
Reply
#6

Wtf... I always take the hard way around scripting.. :/
Reply
#7

Quote:
Originally Posted by Joshb93
Посмотреть сообщение
This is just an example!


Under OnGameModeInit()

Код:
CreateObject( 1239, X, Y, Z, RotX, RotY, RotZ); // fill in the proper coords of where the arrow should go
Under the commands section,

Im going to use ZCMD:

Код:
CMD:enter(playerid, params[])
{
     if(IsPlayerInRangeOfPoint(playerid, X, Y, Z);
     {
         SetPlayerPos(playerid, X, Y, Z); // make the X.Y,Z coords inside the building you want them to go in
         SetCamerBehindPlayer(playerid);
         SetPlayerVirtualWorld(playerid, 1);
         TogglePlayerControllable(playerid, 1); // Ive had some freeze bugs when doing this, so, i always add this
     }
}
Dude that isn't anything related to this, this is pickup making and entering when he touches it, that what you made isn't close to this, or maybe it is, but that isnt what he asked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)