Pickup help
#1

So im trying to make pickups and here is my public OnGameModeInIt:
pawn Код:
public OnGameModeInit()
{
    new house = CreatePickup(1273, 1, 1122.7084, -2037.0289, 69.8942, 0);//-------Line 18
    SetGameModeText("TEST");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}
And then here is my public OnPlayerPickUpPickup:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(1273 == house)//--------------Line 134
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Here are the errors/warnings:
Код:
C:\Users\user\Desktop\New folder (2)\gamemodes\new.pwn(18) : warning 204: symbol is assigned a value that is never used: "house"
C:\Users\user\Desktop\New folder (2)\gamemodes\new.pwn(134) : error 017: undefined symbol "house"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

try this .. hope this can help you ...

Код:
new house;

public OnGameModeInit()
{
    house = CreatePickup(1273, 1, 1122.7084, -2037.0289, 69.8942, 0);//-------Line 18
    SetGameModeText("TEST");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(1273 == house)//--------------Line 134
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Eiy Mard
Посмотреть сообщение
try this .. hope this can help you ...

Код:
new house;

public OnGameModeInit()
{
    house = CreatePickup(1273, 1, 1122.7084, -2037.0289, 69.8942, 0);//-------Line 18
    SetGameModeText("TEST");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(1273 == house)//--------------Line 134
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
        return 1;
    }
    return 1;
}
Worked Thanks
Reply
#4

ok .. nps ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)