01.01.2017, 18:47
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.
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(playerid, ArmaID, ArmaAmmo, Float:X, Float:Y, Float:Z, world, interior)
{
new name[MAX_PLAYER_NAME], gunname[128];
GetWeaponName(ArmaID, gunname, sizeof(gunname));
GetPlayerName(playerid,name,sizeof(name));
if(ArmaID != 0 && ArmaAmmo != 0)
{
for(new i = 0; i < sizeof(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.0, 0, 0, 0, 0, 0);
ArmaDropada[i] = CreateObject(GetGunObjectID(ArmaID), X, Y, Z-1, 80.0, 0.0, 0.0, world);
format(strglobal, sizeof(strglobal), "%s\n(%d)", gunname, ArmaAmmo);
ObjetoDropado2 = Create3DTextLabel(strglobal, -1, X, Y, Z-1, 3.0, world, 0);
RemovePlayerWeapon(playerid, GetPlayerWeapon(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)