/drop gun help?
#1

I made an drop gun system but when i drop the gun is not visible on the ground thanks in advance!

PHP код:
if(strcmp(type"gun"true) == 0)
        {
            if (
GetPVarInt(playerid"PlayerLogged") == 0) return SendClientMessage(playeridCOLOR_WHITE"You must be logged in to use this.");
            if(
GetPlayerWeapon(playerid) == 0) return SendClientMessage(playeridCOLOR_WHITE"This is not a valid weapon.");
            if (
PlayerWeapons[playerid][GetPlayerWeapon(playerid)] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"The weapon you currently have in your hand is labeld a Hacked Weapon, You are either SA-MP Bugged or Cheating !");
            if(
GetPlayerAmmo(playerid) == 0) return SendClientMessage(playeridCOLOR_WHITE"You do not have enough ammo to drop this weapon.");
            if (
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_LIGHTRED"You can't be in a vehicle while you use this !");
            
//if(GetPVarInt(playerid, "GunLic") == 1 && ResWeapon(GetPlayerWeapon(playerid))) return SendClientMessage(playerid, COLOR_GREY ,"Ammunation weapons can not be distributed.");
            
new gunname[128], gunid GetPlayerWeapon(playerid), gunammo GetPlayerAmmo(playerid);
            
GetWeaponName(GetPlayerWeapon(playerid), gunnamesizeof(gunname));
            
format(stringsizeof(string), "*** %s drops %s %s on the ground."sendernameCheckSex(playerid),gunname);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE);
            
GetPlayerPos(playerid,X,Y,Z);
            
RemovePlayerWeaponEx(playeridGetPlayerWeapon(playerid));
            if(
GetPVarInt(playerid"Gloves") == 1sendername="Unknown";
            if(
GetPVarInt(playerid"Member") != && GetPVarInt(playerid"Member") != 7)
            {
                new 
amount2 0;
                for(new 
0sizeof(DropInfo); i++)
                  {
                      if(
strcmp(PlayerName(playerid), DropInfo[i][dOwner], true) == 0)
                      {
                          
amount2++;
                      }
                  }
                  if(
amount2 <= 1DropWeapons(gunid,gunammo,X,Y,Z,GetPlayerVirtualWorld(playerid),PlayerName(playerid),sendername); 
stock
PHP код:
stock DropWeapons(gunID,gunAmmo,Float:X,Float:Y,Float:Z,world,owner[],print[])
{
    new 
string[128];
    if(
gunID != && gunAmmo != && ValidDropGunID(gunID))
    {
        for(new 
0sizeof(DropInfo); i++)
          {
              if(
DropInfo[i][dX] == 0.0 && DropInfo[i][dY] == 0.0 && DropInfo[i][dZ] == 0.0)
              {
                  
strmid(DropInfo[i][dOwner], owner0strlen(owner), 255);
                  
strmid(DropInfo[i][dPrint], print, 0strlen(print), 255);
                  
DropInfo[i][dWeapon] = gunID;
                  
DropInfo[i][dAmmo] = gunAmmo;
                  
DropInfo[i][dX] = X;
                  
DropInfo[i][dY] = Y;
                  
DropInfo[i][dZ] = Z;
                  
DropInfo[i][dWorld] = world;
                  
DropInfo[i][dType] = 1;
                  
DropInfo[i][dObject] = CreateDynamicObject(GetGunObjectID(gunID), XYZ-180.00.00.0world);
                  
format(stringsizeof(string),"[DEBUG]: Gun Object: %d spawned using Weapon-ID: %d | Ammo-ID: %d | World %d",i,DropInfo[i][dWeapon],DropInfo[i][dAmmo],DropInfo[i][dWorld]);
                  
printf(string);
                return 
1;
              }
        }
    }
    return 
1;

Reply


Messages In This Thread
/drop gun help? - by N0FeaR - 14.11.2015, 13:09
Re: /drop gun help? - by Domatite - 14.11.2015, 14:01
Re: /drop gun help? - by XBrianX - 14.11.2015, 14:56
Re: /drop gun help? - by XBrianX - 14.11.2015, 15:02
Re: /drop gun help? - by Abagail - 14.11.2015, 15:11
Re: /drop gun help? - by N0FeaR - 14.11.2015, 19:56
Re: /drop gun help? - by N0FeaR - 14.11.2015, 19:59
Re: /drop gun help? - by XBrianX - 14.11.2015, 20:32
Re: /drop gun help? - by N0FeaR - 15.11.2015, 08:37
Re: /drop gun help? - by N0FeaR - 04.12.2015, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)