SA-MP Forums Archive
How to Create a Pickup... - 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: How to Create a Pickup... (/showthread.php?tid=464624)



How to Create a Pickup... - BoU3A - 18.09.2013

How to Create a Pickup if someone pickup it its Show again after 5min or 10min

sorry for the suck english i hope you understand me :/


Re: How to Create a Pickup... - xganyx - 18.09.2013

pawn Код:
new expick;

forward ShowAgain();

public OnGameModeInit()
{
    expick = CreatePickup(model,type,Xpos,Ypos,Zpos,VirtualWorld);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == expick)
    {
        DestroyPickup(expick);
        SetTimer("ShowAgain",5000,false); // 5000 is 5min 10000 is 10min
    }
    return 1;
}

public ShowAgain()
{
    expick = CreatePickup(model,type,Xpos,Ypos,Zpos,virtualworld);
    return 1;
}
enjoy it


Re: How to Create a Pickup... - BoU3A - 18.09.2013

Thank You + rep


Re: How to Create a Pickup... - Mark_Samp - 18.09.2013

You can also make it by the pickup type like pickup type 2 , you can find the pickups type at : https://sampwiki.blast.hk/wiki/PickupTypes