Help with stock function
#8

PHP код:
GetDrugName playerid ) {
   new 
drugname 30 ];
   for( new 
slot 0slot != 12slot++ )
   {
      if ( 
PlayerInfo playerid ] [ pDrug ] [ slot ] == ) { drugname "Marijuana"; }
      if ( 
PlayerInfo playerid ] [ pDrug ] [ slot ] == ) { drugname "Cocaine"; }
      if ( 
PlayerInfo playerid ] [ pDrug ] [ slot ] == ) { drugname "Heroine"; }
   }
   return 
drugname;

PHP код:
format(stringsizeof(string), "[ 1. %s (%d) ]"GetDrugName(playerid), PlayerInfo[playerid][pDrugAmount][0]); 
the function is using playerid as parameter and it should be passed on calling
Reply


Messages In This Thread
Help with stock function - by nemanjasepa - 30.06.2016, 07:58
Re: Help with stock function - by Vince - 30.06.2016, 08:49
Re: Help with stock function - by nemanjasepa - 30.06.2016, 08:50
Re: Help with stock function - by nemanjasepa - 30.06.2016, 09:06
Re: Help with stock function - by Vince - 30.06.2016, 09:23
Re: Help with stock function - by nemanjasepa - 30.06.2016, 09:49
Re: Help with stock function - by nemanjasepa - 01.07.2016, 15:33
Re: Help with stock function - by SyS - 01.07.2016, 16:52
Re: Help with stock function - by nemanjasepa - 01.07.2016, 19:11
Re: Help with stock function - by jlalt - 01.07.2016, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)