01.06.2015, 19:24
Hello, I'm using a system that allows the weapon to be dropped by choice and at death it would then also drop the weapon that was being used. Unfortunately it only drops the one gun you're using, which means that let us say you scroll away from your weapon then it wont drop anything. How would I make it drop EVERY weapon that the person has on them - with the right amount of ammo, that is.
Код:
stock DropGun(playerid, GunID, GunAmmo, Float:X, Float:Y, Float:Z, world, interior) { 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][DropGunPosX] == 0.0 && DropInfo[i][DropGunPosY] == 0.0 && DropInfo[i][DropGunPosZ] == 0.0) { DropInfo[i][DropGunAmmount][0] = GunID; DropInfo[i][DropGunAmmount][1] = GunAmmo; DropInfo[i][DropGunPosX] = X; DropInfo[i][DropGunPosY] = Y; DropInfo[i][DropGunPosZ] = Z; DropInfo[i][DropGunVWorld] = world; DropInfo[i][DropGunInterior] = interior; DropObject[i] = CreateDynamicObject(GetGunObjectID(GunID), X, Y, Z-1, 80.0, 0.0, 0.0, world); return 1; } } return 1; } return 1; }