SA-MP Forums Archive
Pickup help - 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)
+--- Thread: Pickup help (/showthread.php?tid=351456)



Pickup help - nogh445 - 16.06.2012

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.



Re: Pickup help - Eiy Mard - 16.06.2012

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



Re: Pickup help - nogh445 - 16.06.2012

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


Re: Pickup help - Eiy Mard - 16.06.2012

ok .. nps ..