Pickup Get Mixed?
#1

Hello, here is my code some time my giftpickup get mixed with moneybag pickup why?

OnPlayerPickupPickup( ... )
PHP код:
    new string[512];
    foreach(new 
ID:GiftPickup)
    {
        if(
ID == pickupid)
        {
            
GiveGifts(playerid);
            
SendClientMessage(playerid,-1,""RED"M"GREEN2"E"RED"R"GREEN2"R"RED"Y  "GREEN2"C"RED"H"GREEN2"R"RED"I"GREEN2"S"RED"T"GREEN2"M"RED"A"GREEN2"S!");
            
format(stringsizeof(string), "Recieved ''%s'' From The Gift Box.",GiftName);
            
SendClientMessage(playerid,COLOR_SERVER_HELP_MSG,string);
            
DestroyPickup(ID);
            new 
Next;
            
Iter_SafeRemove(GiftPickupIDNext);
            
ID Next;
        }
    }
    if(
pickupid == BsEnter)
    {
    
SetPlayerPosEx(playerid,-30.946699,-89.609596,1003.546875,0,18,1);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == BsExit)
    {
    
SetPlayerPosEx(playerid,-2489.9768,2362.8135,10.2714,218.8339,0,0);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == PcEnter)
    {
    
SetPlayerPosEx(playerid,-30.946699,-89.609596,1003.546875,0,18,2);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == PcExit)
    {
    
SetPlayerPosEx(playerid,2248.9846,49.2069,26.4844,180.7273,0,0);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == PcBankEnter)
    {
    
SetPlayerPosEx(playerid,2308.5833,-14.7867,26.7422,271.5372,0,3);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == PcBankExit)
    {
    
SetPlayerPosEx(playerid,2300.8494,-16.2232,26.4844,92.4576,0,0);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == lilEnter)
    {
    
SetPlayerPosEx(playerid,-227.4511,1401.0992,27.7656,264.6635,18,4);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == lilExit)
    {
    
SetPlayerPosEx(playerid,-86.7278,1378.7543,10.2734,281.7754,0,0);
    
SetCameraBehindPlayer(playerid);
    }
    else if(
pickupid == MoneyBagPickup)
    {
                new 
Money MoneyBagCash;
                
MoneyBagFound 1;
                
DestroyPickup(MoneyBagPickup);
                
format(stringsizeof(string),"~b~%s (%d) ~w~Has Found Lost Mafia ~g~Money Bag ~w~Somewhere In ~r~%s ~w~And Found ~g~$%d ~n~~w~Inside It."PlayerInfo[playerid][pName], playeridMoneyBagLocationMoney);
                
SendClientOnScreenTextToAll(string);
                
format(stringsizeof(string),"%s (%d) Has Found Lost Mafia Money Bag Somewhere In %s And Found $%d Inside It."PlayerInfo[playerid][pName], playeridMoneyBagLocationMoney);
                
SendClientMessageToAll(COLOR_SERVER_HELP_MSG,string);
                
format(string,sizeof(string),"~w~Found ~g~$%d"Money);
                
GameTextForPlayer(playeridstring5000,3);
                
GiveCash(playeridMoney);
                
ApplyAnimation(playerid"CARRY""liftup"500000);
                
PlayerInfo[playerid][pMoneyBags]++;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)