CreatePickup
#1

I have a problem i do not get errors or warnings, but my pickup did not show in game...

pawn Код:
new faggio;
new nrg;
ongamemodeinit
pawn Код:
faggio = CreatePickup(1274,23,-71.605,3310.047,17.908);
nrg = CreatePickup(1274,23,4903.774,1002.968,219.791);
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == faggio)
    {
        SendClientMessage(playerid, -1, ""#COL_GREY"Very good");
        GivePlayerMoney(playerid, 5000);
        SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
    }
    if(pickupid == nrg)
    {
        SendClientMessage(playerid, -1, ""#COL_GREY"Very good");
        GivePlayerMoney(playerid, 2500);
        SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
    }
    return 1;
}
i have faggio pickup but not nrg... Can somebody help me
Reply
#2

Both the SetPlayerPos are same.. maybe that is the problem.
Did you add vehicles in different places? Then find the position of the nrg and update the xyz coords of the nrg pickup.
Reply
#3

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == faggio)
    {
        
SendClientMessage(playeridCOL_GREY"Very good");
        
GivePlayerMoney(playerid5000);
        
SetPlayerPos(playerid1529.6,-1691.2,13.3);
    }
    if(
pickupid == nrg)
    {
        
SendClientMessage(playeridCOL_GREY"Very good");
        
GivePlayerMoney(playerid2500);
        
SetPlayerPos(playerid1529.6,-1691.2,13.3);
    }
    return 
1;

if you have pickups above about 100 you may need to use incognito's streamer
Reply
#4

I have just 2 pickups....
Reply
#5

Try changing the pickupid from 23 to 1, as 23 "is pickupable, but doesn't disappear on pickup" according to SA:MP wiki lol.
Reply
#6

I now that, i will test it...

Do not work :S
Reply
#7

If your pickup doesn't show ingame then it's a co-ordonates problem. If you are using virtual worlds, try just setting it to a certain world or just -1.
Reply
#8

I really don't get this. What does the pickups actually do, just give money and change the position of the player?

Do you teleport to "Faggio" when you pickup nrg?
Reply
#9

your...
Код:
nrg = CreatePickup(1274,23,4903.774,1002.968,219.791);
...X coordinate is out of bounds. the GTA engine wont display the pickup there, but it will work. place it at a position which you can always find, and pay attention what happens when you touch it...
Reply
#10

Quote:
Originally Posted by Babul
Посмотреть сообщение
your...
Код:
nrg = CreatePickup(1274,23,4903.774,1002.968,219.791);
...X coordinate is out of bounds. the GTA engine wont display the pickup there, but it will work. place it at a position which you can always find, and pay attention what happens when you touch it...
X co-ordonite isn't actually out of bounds. 20k in the X and Y directions is 'out of bounds'. Make sure that it's the right position though.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)