SA-MP Forums Archive
Entrance to... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Entrance to... (/showthread.php?tid=190846)



Entrance to... - marinov - 16.11.2010

I want to know how do I make those "Pickups" that if a player walks into it it will send him to a interior. And how can I build custom interiors ?


EDIT: I want a "Down arrow" pickup (ID: 1318 ) at coordinates : X: 263.129018935547 Y: 2896.1943359375
Z: 10.377650260925

And if a player walks in it it will tele him to this interior : X:2324.419921 Y:-1145.568359 Z:1050.710083


Re: Entrance to... - Steven82 - 16.11.2010

Use MTA:SA to build custom interiors. And for the pickup thing, there are tutorials in the tutorials section on this forum. Please search or attempt to look.


Re: Entrance to... - marinov - 16.11.2010

I serched and found this :

pawn Code:
//This is at the top
new pickup;


public OnGameModeInit()
{
    pickup=CreatePickup(...);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid==pickup)
    {
        SetPlayerInterior(...);
        SetPlayerPos(...);
    }
}
But I can't figure out how to put it together


Re: Entrance to... - willsuckformoney - 16.11.2010

Search Wiki.


Re: Entrance to... - marinov - 16.11.2010

pawn Code:
//This is at the top
new pickup;


public OnGameModeInit()
{
    pickup=CreatePickup(1318, 263.129018935547, 2896.1943359375, 10.377650260925);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid==pickup)
    {
        SetPlayerInterior(12);
        SetPlayerPos(2324.419921, 1145.568359, 1050.710083);
    }
}
is this right ?


Re: Entrance to... - Steven82 - 16.11.2010

Yup test it in the server


Re: Entrance to... - marinov - 16.11.2010

It gave me 5 warnings:

pawn Code:
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(820) : warning 213: tag mismatch
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(820) : warning 202: number of arguments does not match definition
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(2063) : warning 202: number of arguments does not match definition
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(2064) : warning 213: tag mismatch
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(2064) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Warnings.

Lines are:


pawn Code:
820        pickup = CreatePickup(1318, 263.129018935547, 2896.1943359375, 10.377650260925);
2063        SetPlayerInterior(12);
2064        SetPlayerPos(2324.419921, 1145.568359, 1050.710083);



Re: Entrance to... - Nero_3D - 17.11.2010

Look at the parameter (green you had, red you missed)

pickup = CreatePickup(model, type, Float:X, Float:Y, Float:Z, Virtualworld);
SetPlayerInterior(playerid, interiorid);
SetPlayerPos(playerid, Float:x, Float:y, Float:z);


If you dont know what to type in for them check the wiki


Re: Entrance to... - marinov - 17.11.2010

ok, but having some trouble with the Virtualworld. What shoukd I put ?

PS: is type 1 good for what I want ? And for the Virtualworld I use -1, but when I enter it I fall from the sky


Re: Entrance to... - marinov - 17.11.2010

pawn Code:
new pickup;
    pickup = CreatePickup(1318, 1, 263.129018935547, 2896.1943359375, 10.377650260925, -1);
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid==pickup)
    {
        SetPlayerInterior(playerid, 12);
        SetPlayerPos(playerid, 2324.419921, 1145.568359, 1050.710083);
    }
}