Need help with OnPlayerPickUpDynamicPickup
#1

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;
}
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)