SA-MP Forums Archive
Need help with OnPlayerPickUpDynamicPickup - 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: Need help with OnPlayerPickUpDynamicPickup (/showthread.php?tid=450020)



Need help with OnPlayerPickUpDynamicPickup - IceBilizard - 11.07.2013

guys i made 2 dynamic pickups for my bank system and i set the messages for player like if player don't have bank account then show /registerbank and if have then show /bankhelp but when player goes on the pickup and it showing alot of spam on chat for /registerbank and /bankhelp without stops any one have idea for stop this spam here is pic and code


pic




here is code

pawn Код:
new b1,b2;

b1 = CreateDynamicPickup(1239,1,2316.6189,-10.1248,26.7422,-1);
b2 = CreateDynamicPickup(1239,1,2316.5271,-12.6242,26.7422,-1);

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
        if(pickupid == b1)
    {
        if(PlayerInfo[playerid][AccNo] == 0) return SendClientMessage(playerid,COLOR_YELLOW,"Use /registerbank");
        if(PlayerInfo[playerid][AccNo] != 0) return SendClientMessage(playerid,COLOR_YELLOW,"Use /bankhelp");
    }
    else if(pickupid == b2)
    {
        if(PlayerInfo[playerid][AccNo] == 0) return SendClientMessage(playerid,COLOR_YELLOW,"Use /registerbank");
        if(PlayerInfo[playerid][AccNo] != 0) return SendClientMessage(playerid,COLOR_YELLOW,"Use /bankhelp");
    }
        return 1;
}



Re: Need help with OnPlayerPickUpDynamicPickup - Mmartin - 11.07.2013

https://sampwiki.blast.hk/wiki/PickupTypes
Use 2 instead of 1, he'll pick it up and it'll despawn for some time, then re-appear once he's out of reach.