Code not running.
#1

Hello, I'm trying a problem in the code but I can not, what's the problem? Simple, the player can drop only one item at a time, for example, I dropped one AK47 and can not drop another. I've debugged, there's no use.

Common questions.
What happens when you drop more than one item? Ae shows an error in the script, I will show what is not executed, I will show the part.

In short, a certain part of the code is not executed, so you can not drop more than one item at a time.


PHP код:
stock DroparArma(playeridArmaIDArmaAmmoFloat:XFloat:YFloat:Zworldinterior)
{
    new 
name[MAX_PLAYER_NAME], gunname[128];
    
GetWeaponName(ArmaIDgunnamesizeof(gunname));
    
GetPlayerName(playerid,name,sizeof(name));
    if(
ArmaID != && ArmaAmmo != 0)
    {
        for(new 
0sizeof(ArmasInfo); i++)
          {
              if(
ArmasInfo[i][ArmaPosX] == 0.0 && ArmasInfo[i][ArmaPosY] == 0.0 && ArmasInfo[i][ArmaPosZ] == 0.0)
              { 
//On that down line does not run
                  
ArmasInfo[i][ArmaInfo][0] = ArmaID;
                  
ArmasInfo[i][ArmaInfo][1] = ArmaAmmo;
                  
ArmasInfo[i][ArmaPosX] = X;
                  
ArmasInfo[i][ArmaPosY] = Y;
                  
ArmasInfo[i][ArmaPosZ] = Z;
                  
ArmasInfo[i][ArmaWorld] = world;
                  
ArmasInfo[i][ArmaInterior] = interior;
                  
                  
ApplyAnimation(playerid"BOMBER""BOM_PLANT_IN"10000.000000);
            
                  
ArmaDropada[i] = CreateObject(GetGunObjectID(ArmaID), XYZ-180.00.00.0world);
                
format(strglobalsizeof(strglobal), "%s\n(%d)"gunnameArmaAmmo);
                
ObjetoDropado2 Create3DTextLabel(strglobal, -1XYZ-13.0world0);
                
                
RemovePlayerWeapon(playeridGetPlayerWeapon(playerid));
                return 
1;
              }
              return 
1;
        }
        return 
1;
    }
    return 
1;

PHP код:
if(ArmasInfo[i][ArmaPosX] == 0.0 && ArmasInfo[i][ArmaPosY] == 0.0 && ArmasInfo[i][ArmaPosZ] == 0.0
Reply


Messages In This Thread
Code not running. - by SukMathcuck - 01.01.2017, 18:47
Re: Code not running. - by Spmn - 01.01.2017, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)