SA-MP Forums Archive
CreatePickup - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CreatePickup (/showthread.php?tid=264116)



CreatePickup - Speed - 24.06.2011

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


Re: CreatePickup - iPLEOMAX - 24.06.2011

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.


Re: CreatePickup - LZLo - 24.06.2011

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


Re: CreatePickup - Speed - 25.06.2011

I have just 2 pickups....


Re: CreatePickup - alpha500delta - 25.06.2011

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


Re: CreatePickup - Speed - 25.06.2011

I now that, i will test it...

Do not work :S


Re: CreatePickup - [HiC]TheKiller - 25.06.2011

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.


Re: CreatePickup - iPLEOMAX - 25.06.2011

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?


Re: CreatePickup - Babul - 25.06.2011

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...


Re: CreatePickup - [HiC]TheKiller - 25.06.2011

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.