OnPlayerPickUpPickup problem
#1

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == m4[ 0 ] || m4[ 1 ] || m4[ 2 ] || m4[ 3 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~m4!", 2500, 6);
        GivePlayerWeapon(playerid, 31, 20);
    }
   
    else if(pickupid == Rocket)
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Rocket launcher!", 2500, 6);
        GivePlayerWeapon(playerid, 35, 3);
    }
   
    else if(pickupid == Spaz[ 0 ] || Spaz[ 1 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Spaz12!", 2500, 6);
        GivePlayerWeapon(playerid, 27, 20);
    }
   
    else if(pickupid == Tec9[ 0 ] || Tec9[ 1 ] || Tec9[ 2 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Tec9!", 2500, 6);
        GivePlayerWeapon(playerid, 32, 20);
    }
   
    else if(pickupid == Shotgun[ 0 ] || Shotgun[ 1 ] )
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Shotgun!", 2500, 6);
        GivePlayerWeapon(playerid, 25, 25);
    }
   
    else if(pickupid == sniper[ 0 ] || sniper[ 1 ] || sniper[ 2 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Sniper!", 2500, 6);
        GivePlayerWeapon(playerid, 34, 10);
    }
   
    else if(pickupid == Desert[ 0  ] || Desert[ 1 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Desert!", 2500, 6);
        GivePlayerWeapon(playerid, 24, 13);
    }
   
    else if(pickupid == Uzi[ 0 ] || Uzi[ 1 ])
    {
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Uzi!", 2500, 6);
        GivePlayerWeapon(playerid, 28, 50);
    }
   
    else if(pickupid == Ah[ 0 ] || Ah[ 1 ])
    {
        if(Ah[ 0 ]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Health pack!", 2500, 6);
        if(Ah[ 1 ]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~w~~h~Armour pack!", 2500, 6);
        ahpicked[ playerid ][ 0 ] = true;
        ahpicked[ playerid ][ 1 ] = true;
    }
    return 1;
}
When i try to pick anything that is not m4, it says it's an m4 and gives me m4 ammo.. but also gives me the other gun ammo, gives me both... please help!
Reply


Messages In This Thread
OnPlayerPickUpPickup problem - by Strier - 24.05.2013, 20:35
AW: OnPlayerPickUpPickup problem - by HurtLocker - 24.05.2013, 21:05
Re: OnPlayerPickUpPickup problem - by Littlehelper - 24.05.2013, 21:13
Re: OnPlayerPickUpPickup problem - by Strier - 24.05.2013, 21:15
Re: OnPlayerPickUpPickup problem - by Babul - 24.05.2013, 21:50
Re: OnPlayerPickUpPickup problem - by Strier - 24.05.2013, 22:00
Re: OnPlayerPickUpPickup problem - by Vince - 24.05.2013, 22:12
Re: OnPlayerPickUpPickup problem - by Strier - 24.05.2013, 22:25
Re: OnPlayerPickUpPickup problem - by Babul - 26.05.2013, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)