enum enum_winfo
{
	wUsedAmmo,
	Float:wOrigDamage,
	Float:wModDamage,
	wClipsize,
	wObjectID,
	bool:wSkillable,
	wAmmoType,
	wType,
	wAttribute,
	wName[30],
}

enum (+=1)
{
	wAmmoNone,
	wAmmo9mm = 0,
	wAmmo556,
	wAmmo308,
	wAmmo12G
}

enum (<<=1)
{
	wAmmoTypeNone = 0,
	wAmmoTypeNormal = 1,
	wAmmoTypePiercing,
	wAmmoTypeBurn,
	wAmmoTypeFlechet,
	wAmmoTypeExplosive,
}

enum (<<=1)
{
	wNahkampf = 1,  //Nahkampfwaffe
	wSchuss,        //Feuert Projektile
	wWurf,          //Wurfwaffe
	wSpecial,       //Spezialwaffe
	wOnehand,       //Einhändig
	wTwohand,       //Zweihändig
}

enum (<<=1)
{
	wHeadshot = 1,  //Kann headshots verteilen
	wSpread,        //Streut, Schaden nimmt mit Distanz ab
	wThrowBack,     //Kann Gegner zurückwerfen
	wKnockout,      //Kann Gegner zu Boden werfen
	wTaunt,         //Kann Gegner kampfunfähig machen (wie spray)
	wBleed,         //Bringt Gegner zum bluten
	wBurn,          //Verbrennt Gegner
	wExplode,       //Lässt Gegner explodieren
}

new const Float:WeaponInfo[][enum_winfo] = {
	{wAmmo9mm,	1.32,	3.0,	0,		331,	false,	wAmmoTypeNone,		wNahkampf|wOnehand,				0,								"Faust"},                       //0
	{wAmmo9mm,	1.32,	5.0,	0,  	331,	false,	wAmmoTypeNone,		wNahkampf|wOnehand,				0,								"Schlagring"},                  //1
	{wAmmo9mm,	4.62,	7.0,	0,  	333,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wKnockout,						"Golfschlaeger"},               //2
	{wAmmo9mm,	4.62,	7.0,	0,  	334,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wKnockout,						"Schlagstock"},					//3
	{wAmmo9mm,	2.64,	7.0,	0,  	335,	false,	wAmmoTypeNone,		wNahkampf|wSpecial|wOnehand,	wBleed,							"Messer"},						//4
	{wAmmo9mm,	4.62,	7.0,	0,  	336,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wKnockout,						"Baseballschlaeger"},			//5
	{wAmmo9mm,	4.62,	7.0,	0,  	337,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wKnockout,						"Schaufel"},                    //6
	{wAmmo9mm,	4.62,	7.0,	0,  	338,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wKnockout,						"Billardcue"},                  //7
	{wAmmo9mm,	2.64,	15.0,	0,  	339,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				wBleed,							"Katana"},                      //8
	{wAmmo9mm,	13.5,	8.0,	0,  	341,	false,	wAmmoTypeNone,		wNahkampf|wSpecial,				wBleed,							"Kettensaege"},                 //9
	{wAmmo9mm,	4.62,	5.0,	0,		321,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Dildo 1"},						//10
	{wAmmo9mm,	2.64,	5.0,	0,  	332,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Dildo 2"},                     //11
	{wAmmo9mm,	4.62,	5.0,	0,  	323,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Vibrator"},                    //12
	{wAmmo9mm,	2.64,	5.0,	0,  	324,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Silberner Vibrator"},          //13
	{wAmmo9mm,	4.62,	2.0,	0,  	325,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Blumenstrauß"},                //14
	{wAmmo9mm,	2.64,	7.0,	0,  	326,	false,	wAmmoTypeNone,		wNahkampf|wTwohand,				0,								"Stock"},                       //15
	{wAmmo9mm,	0.00,	0.0,	1,  	342,	false,	wAmmoTypeExplosive,	wWurf|wSpecial,					wExplode,						"Handgranate"},                 //16
	{wAmmo9mm,	0.00,	0.0,	1,  	343,	false,	wAmmoTypeNormal,	wWurf|wSpecial,					0,								"Traenengas"},                  //17
	{wAmmo9mm,	0.00,	0.0,	1,  	344,	false,	wAmmoTypeBurn,		wWurf|wSpecial,					wBurn,							"Molotov"},                     //18
	{wAmmo9mm,	0.00,	0.0,	0,  	0,		false,	wAmmoTypeNone,		0,								0,								""},                            //19
	{wAmmo9mm,	0.00,	0.0,	0,  	0,		false,	wAmmoTypeNone,		0,								0,								""},                            //20
	{wAmmo9mm,	0.00,	0.0,	0,		0,		false,	wAmmoTypeNone,		0,								0,								""},                            //21
	{wAmmo9mm,	8.25,	12.0,	17,		346,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wHeadshot,						"9mm Pistole"},		            //22
	{wAmmo9mm,	13.2, 	15.0,	17, 	347,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wHeadshot,						"9mm Pistole schallgedaempft"}, //23
	{wAmmo9mm,	46.2,	20.0,	7,		348,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wHeadshot,						"Desert Eagle"},                //24
	{wAmmo12G,	49.5,	50.0,	1,		349,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wThrowBack|wHeadshot|wSpread,	"Schrotflinte"},                //25
	{wAmmo12G,	36.3,	40.0,	2,		350,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wThrowBack|wHeadshot|wSpread,	"Abgesaegte Schrotflinte"},     //26
	{wAmmo12G,	39.6,	40.0,	7,		351,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wThrowBack|wHeadshot|wSpread,	"Kampfflinte"},                 //27
	{wAmmo9mm,	6.6,	8.0,	50,		352,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wHeadshot,						"Micro SMG"},                   //28
	{wAmmo9mm,	8.25,	10.0,	30,		353,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wHeadshot,						"MP5"},                         //29
	{wAmmo556,	9.9,	13.0,	30,		355,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wHeadshot,						"AK-47"},						//30
	{wAmmo556,	9.9,	13.0,	50,		356,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wHeadshot,						"M4"},                          //31
	{wAmmo9mm,	6.6,	8.0,	50,		372,	true,	wAmmoTypeNormal,	wSchuss|wOnehand,				wHeadshot,						"Tec-9"},                       //32
	{wAmmo308,	24.75,	35.0,	1,		357,	false,	wAmmoTypeNormal,	wSchuss|wTwohand,				wHeadshot,						"Jagdgewehr"},                  //33
	{wAmmo308,	41.25,	70.0,	1,		358,	true,	wAmmoTypeNormal,	wSchuss|wTwohand,				wHeadshot,						"Scharfschuetzengewehr"},       //34
	{wAmmo9mm,	0.00,	0.0,	1,		359,	false,	wAmmoTypeNormal,	wSchuss|wSpecial,				wExplode,						"RPG"},                         //35
	{wAmmo9mm,	0.00,	0.0,	1,		360,	false,	wAmmoTypeNormal,	wSchuss|wSpecial,				wExplode,						"HS Raketenwerfer"},            //36
	{wAmmo9mm,	0.00,	0.0,	1/*500*/,361,	false,	wAmmoTypeBurn,		wSpecial|wTwohand,				wBurn,							"Flammenwerfer"},               //37
	{wAmmo9mm,	46.2,	6.0,	1/*500*/,362,	false,	wAmmoTypeNormal,	wSchuss|wTwohand,				0,								"Minigun"},                     //38
	{wAmmo9mm,	0.00,	0.0,	1,		363,	false,	wAmmoTypeExplosive,	wSpecial,						wExplode,						"Bombe"},                       //39
	{wAmmo9mm,	0.00,	0.0,	1,		364,	false,	wAmmoTypeNone,		wSpecial,						0,								"Detonator"},					//40
	{wAmmo9mm,	0.33,	0.0,	1/*500*/,365,	false,	wAmmoTypeNormal,	wSpecial|wOnehand,				wTaunt,							"Spray"},                       //41
	{wAmmo9mm,	0.33,	0.0,	1/*500*/,366,	false,	wAmmoTypeNormal,	wSpecial|wTwohand,				wTaunt,							"Feuerloescher"},               //42
	{wAmmo9mm,	1.32,  0.0,    	0,  	18637,	true,   wAmmoTypeNone,		wNahkampf|wOnehand,  			wKnockout,						"Brechstange"},					//Equip 18634
	{wAmmo9mm,	1.32,  0.0,    	0,  	337,	true,   wAmmoTypeNone,		wNahkampf|wOnehand,  			wKnockout,						"Schaufel"},					//Equip 337
	{wAmmo9mm,	1.32,  0.0,    	0,  	18635,	true,   wAmmoTypeNone,		wNahkampf|wOnehand,  			wKnockout,						"Hammer"},						//Equip 18635
	{wAmmo9mm,	1.32,  0.0,    	0,  	18633,	true,   wAmmoTypeNone,		wNahkampf|wOnehand,  			wKnockout,						"Schraubenschluessel"},			//Equip 18633
	{wAmmo9mm,	1.32,  0.0,    	0,  	335,	true,   wAmmoTypeNone,		wNahkampf|wOnehand,  			wBleed,							"Messer"},						//Equip 335
	{wAmmo9mm,	1.32,  0.0,    	0,  	18642,	true,   wAmmoTypeNone,		wNahkampf|wOnehand|wSpecial,	0,								"Tazer"}               			//Equip 18642
};

stock GetWeaponModel(weaponid)
{
	if(0 <= weaponid < sizeof(WeaponInfo))
	{
	    return WeaponInfo[weaponid][wObjectID];
	}
	return 0;
}

forward bool:IsWeaponDisabled(weaponid);
public bool:IsWeaponDisabled(weaponid)
{
	switch(weaponid)
	{
	    case 4,16,17,18,19,20,21,35,36,37,38,39,40,43,44,45: return true;
	}
	return false;
}

forward bool:CanReloadWhileMoving(playerid,weaponid);
stock bool:CanReloadWhileMoving(playerid,weaponid)
{
	switch(weaponid)
	{
	    case 22: if(GetPVarInt(playerid,"WEAPONSKILL_PISTOL") 			>= 300) return true;//9mm Pistole
	    case 23: if(GetPVarInt(playerid,"WEAPONSKILL_PISTOL_SILENCED") 	>= 400) return true;//S 9mm Pistole
	    case 28: if(GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI") 		>= 500) return true;//UZI
	    case 32: if(GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI") 		>= 500) return true;//Tec9
	    case 29: if(GetPVarInt(playerid,"WEAPONSKILL_MP5") 				>= 750) return true;//MP5
	}
	return false;
}

stock GetWeaponClipsize(playerid,weaponid)
{
	new clipsize = 0;
    if(0 <= weaponid < sizeof(WeaponInfo))
    {
		clipsize =  WeaponInfo[weaponid][wClipsize];
		if(weaponid == 22 && GetPVarInt(playerid,"WEAPONSKILL_PISTOL")					>= 999)	return (clipsize*2);
		else if(weaponid == 26 && GetPVarInt(playerid,"WEAPONSKILL_SAWNOFF_SHOTGUN")	>= 999)	return (clipsize*2);
		else if(weaponid == 28 && GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI")			>= 999)	return (clipsize*2);
		else if(weaponid == 31 && GetPVarInt(playerid,"WEAPONSKILL_M4")              	<  999) return (30);
		else if(weaponid == 32 && GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI")			>= 999)	return (clipsize*2);
	}
	#pragma unused playerid
	return clipsize;
}