OnPlayerPickupPickup
#1

So i am using these 2 parameters to check if the pickup picked is right:

PHP код:
if(pickupid == Gift[gifts] && Picked[playerid] == 0
in a filterscript ^ but it still somehow detects server's pickups and does the things that are gift pickups supposed to, so i wanted to ask if there's a way to check the pickup model is == X (in my case checking of model is gift pickup)
... ?
Reply
#2

The first thing you should do is check if streamer adds up the IDs for the gamemode and any other filterscript (for example, gamemode is using IDs from 0 to 10, does the filterscript start at 0 or at 11?).

Once you validate that, you'll certainly know what to do next.
Reply
#3

Things could be more simple if i could check pickup model.... since i dont know how to check the ids
Reply
#4

Check this out.. I think that is what are you looking for

https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup

Take a look at example code.
Reply
#5

No, i am looking for a function that returns the pickup model by passing pickupid as parameter.
Reply
#6

I don't understand how you expect to get the model ID, if you're claming that the reported pickupids are wrong.

Anyway:
pawn Код:
Streamer_GetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_MODEL_ID)
Reply
#7

What i am going to do is, check if the pickedup id's model is == a specific model, only in that case it will work, otherwise nope.

Quote:

Streamer_GetIntData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_MODEL_ID)

Returns model? and what do i pass it? pickupid?
Reply
#8

PHP код:
for(new gifts 0gifts MAX_GIFTSgifts++ )
    {
        new 
mod Streamer_GetIntData(STREAMER_TYPE_PICKUPGift[gifts], E_STREAMER_MODEL_ID);
        if(
mod == 19054 || mod == 19055 || mod == 19056 || mod == 19058 || mod == 19057)    
        {
            if(
pickupid == Gift[gifts] && Picked[playerid] == 0)
            { 
doesnt works.
Reply
#9

nvm i wasnt using dynamic pickup and thus that thing wouldnt work, worked now. ty.
Reply
#10

So you weren't even using streamer then, thus, invalid thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)