Some more pickup help..
#1

So I have it set up and it compiles but when I walk into the pickup it wont put me into the interior.
Code:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid, 1318 == house)
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Reply
#2

Quote:
Originally Posted by nogh445
Посмотреть сообщение
So I have it set up and it compiles but when I walk into the pickup it wont put me into the interior.
Code:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == house)
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Reply
#3

Pickupid isn't the model of the pickup, it's the internal id. Assign the value returned by "CreatePickup" to a var. This is the pickupid.

pawn Код:
house = CreatePickup(...);//house now holds this pickups ID (pickupid)
Then OnPlayerPickUpPickup

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == house)
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
EDIT: Too slow.
Reply
#4

Quote:
Originally Posted by [NWA]Hannes
Посмотреть сообщение
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == house)
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Worked. Thanks a bunch!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)