drop gun problem
#3

pawn Код:
stock DropWeapons(gunID,gunAmmo,Float:X,Float:Y,Float:Z,world,playerid)
{
    if(IsADisabledWeapon(playerid,gunID))
    {
        return 1;
    }
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    if(gunID != 0 && gunAmmo != 0)
    {
        for(new i = 0; i < sizeof(DropInfo); i++)
        {
            if(DropInfo[i][dx] == 0.0 && DropInfo[i][dy] == 0.0 && DropInfo[i][dz] == 0.0)
            {
                DropInfo[i][dType] = 1;
                DropInfo[i][dAmount][0] = gunID;
                DropInfo[i][dAmount][1] = gunAmmo;
                DropInfo[i][dx] = X;
                DropInfo[i][dy] = Y;
                DropInfo[i][dz] = Z;
                DropInfo[i][dWorld] = world;
                strcpy(DropInfo[i][dPlayerName],name,MAX_PLAYER_NAME);
                DropObject[i] = CreateDynamicObject(gh_GetObjectID(gunID), X, Y, Z-1, 80.0, 0.0, 0.0, world);
                return 1;
            }
        }
        return 1;
    }
    return 1;
}
pawn Код:
enum dInfo
{
    dType,
    dAmount[2],
    Float:dx,
    Float:dy,
    Float:dz,
    dWorld,
    dPlayerName[MAX_PLAYER_NAME],
};

new DropInfo[500][dInfo];
Reply


Messages In This Thread
drop gun problem - by N0FeaR - 04.06.2012, 19:15
Re: drop gun problem - by Firo - 04.06.2012, 19:23
Re: drop gun problem - by tiernantheman - 04.06.2012, 19:32
Re: drop gun problem - by N0FeaR - 04.06.2012, 19:34
Re: drop gun problem - by tiernantheman - 04.06.2012, 19:38
Re: drop gun problem - by Firo - 04.06.2012, 19:38
Re: drop gun problem - by N0FeaR - 04.06.2012, 20:36

Forum Jump:


Users browsing this thread: 2 Guest(s)