Entrance to...
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

Search Wiki.
Reply
#5

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 ?
Reply
#6

Yup test it in the server
Reply
#7

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);
Reply
#8

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
Reply
#9

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
Reply
#10

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);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)