Drop Help
#1

The object wont be created, as u see i added printf and won't show up the printf("test2");, hope u guys will be able to help me out

PHP код:
    else if(strcmp(choice,"pot",true) == 0)
    {
        if(
PlayerInfo[playerid][pPot] > 0)
        {
            
format(stringsizeof(string), "You have dropped %d grams of pot."PlayerInfo[playerid][pPot]);
            
SendClientMessageEx(playeridCOLOR_WHITEstring);
            
PlayerPlaySound(playerid10520.00.00.0);
            
format(stringsizeof(string), "* %s has thrown away their pot."GetPlayerNameEx(playerid));
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            new 
amount2 0amounto PlayerInfo[playerid][pPot];
            
PlayerInfo[playerid][pPot] = 0;
            
GetPlayerPos(playerid,X,Y,Z);
            
printf("test");
               for(new 
0sizeof(DropInfo); i++)
              {
                  if(
strcmp(GetPlayerNameEx(playerid), DropInfo[i][dpOwner], true) == 0)
                  {
                      
amount2++;
                  }
              }
            if(
amount2 <= 2)
               {
               for(new 
0sizeof(DropInfo); i++)
                 {
                      
printf("test2");
                     if(
DropInfo[i][dpX] == 0.0 && DropInfo[i][dpY] == 0.0 && DropInfo[i][dpZ] == 0.0)
                   {
                         
strmid(DropInfo[i][dpOwner], GetPlayerNameEx(playerid), 0strlen(GetPlayerNameEx(playerid)), 255);
                         
DropInfo[i][dpAmmo] = amounto;
                         
DropInfo[i][dpX] = X;
                         
DropInfo[i][dpY] = Y;
                         
DropInfo[i][dpZ] = Z;
                         
DropInfo[i][dpWorld] = GetPlayerVirtualWorld(playerid);
                         
DropInfo[i][dpType] = 2;
                         
DropInfo[i][dpObject] = CreateDynamicObject(1578XYZ-10.00.00.0GetPlayerVirtualWorld(playerid));
                       return 
1;
                       }
                  }
              }
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_GREY"You are not carrying any pot to throw away!");
        }
    } 
Reply


Messages In This Thread
Drop Help - by N0FeaR - 06.02.2016, 18:28
Re: Drop Help - by Sascha - 06.02.2016, 18:54
Re: Drop Help - by N0FeaR - 06.02.2016, 19:24
Re: Drop Help - by Sascha - 06.02.2016, 20:36
Re: Drop Help - by N0FeaR - 07.02.2016, 08:46
Re: Drop Help - by Sascha - 07.02.2016, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)