weapon pickup not showing but is there.
#7

I know you're finished now, but I wanna give you a little tip:

Change this:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{   
if(
pickupid == PICKUP_HEALTH)
  {   
       return 
1;
  }  
  
if(
pickupid == PICKUP_ARMOR
   {       
      return 
1
   } 
 
if(
pickupid == PICKUP_SHOTGUN
   {        
      
GameTextForPlayer(playerid"~w~You Picked up the ShotGun"50005);
      
GivePlayerWeapon(playerid,27,500);    
      return 
1;  
   }
   
 return 
1;

To this:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{   
if(
pickupid == PICKUP_HEALTH)
  {   
       return 
1;
  }  
  
else if(
pickupid == PICKUP_ARMOR
   {       
      return 
1
   } 
 
else if(
pickupid == PICKUP_SHOTGUN
   {        
      
GameTextForPlayer(playerid"~w~You Picked up the ShotGun"50005);
      
GivePlayerWeapon(playerid,27,500);    
      return 
1;  
   }
   
 return 
1;

Sometimes, it may confuse the server, and also, else-if would be better at this place...
'Cause I heard bad experience about forgetting the else-if and taking instead only if!!
Reply


Messages In This Thread
weapon pickup not showing but is there. - by Madd Kat - 05.02.2012, 15:08
Re: weapon pickup not showing but is there. - by Finn - 05.02.2012, 15:15
Re: weapon pickup not showing but is there. - by niels44 - 05.02.2012, 15:20
Re: weapon pickup not showing but is there. - by Finn - 05.02.2012, 15:21
Re: weapon pickup not showing but is there. - by Madd Kat - 05.02.2012, 15:23
Re: weapon pickup not showing but is there. - by Madd Kat - 05.02.2012, 15:47
Re: weapon pickup not showing but is there. - by Twisted_Insane - 05.02.2012, 15:53
Re: weapon pickup not showing but is there. - by Madd Kat - 05.02.2012, 16:08
Re: weapon pickup not showing but is there. - by Finn - 05.02.2012, 16:10
Re: weapon pickup not showing but is there. - by Madd Kat - 05.02.2012, 16:18

Forum Jump:


Users browsing this thread: 2 Guest(s)