PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Langweile? :o


Kia
28.03.2013, 00:40
Hallo,

Mir ist langweilig und Thomas hat kein Eis mehr. :/
Viel Spaß damit. :o

#include <cstrike>
#include <fun>
#include <engine>

enum (<<=1)
{
CLIP = 1,
BP,
BOTH = CLIP | BP
}

stock set_weapon_fullammo(id, CSW_WEAPON, iFillType = BOTH)
{
static const iBPAmmo[CSW_P90 + 1] = {
0, 52, 90, 1, 32, -1, 100, 90, 1, 120, 100, 120, 90, 90, 90,
90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 1, 35, 90, 90, -1, 100
}

static const iClipAmmo[CSW_P90 + 1] = {
0, 13, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 30, 30, 35,
12, 20, 10, 30, 100, 8, 30, 30, 30, 1, 7, 30, 30, -1, 50
}

static const NullWeapons = ( (1<<CSW_C4) | (1<<CSW_KNIFE) )
static const iGrenadesBitSum = ( (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (1<<CSW_SMOKEGRENADE) )

static szWeapon[25], iWeapon

if( (1<<CSW_WEAPON) & NullWeapons || (!(CSW_P228 <= CSW_WEAPON <= CSW_P90) ) || !is_user_connected(id))
return 0

if((1<<CSW_WEAPON) & iGrenadesBitSum)
{
if(!user_has_weapon(id, CSW_WEAPON))
{
get_weaponname(CSW_WEAPON, szWeapon, charsmax(szWeapon))
give_item(id, szWeapon)
}

return 1
}

if(iFillType & CLIP)
{
if(!user_has_weapon(id, CSW_WEAPON))
return 0

iWeapon = -1,
get_weaponname(CSW_WEAPON, szWeapon, charsmax(szWeapon))
iWeapon = find_ent_by_owner(iWeapon, szWeapon, id)

if(iWeapon)
{
cs_set_weapon_ammo(iWeapon, iClipAmmo[CSW_WEAPON])
}
}

if( iFillType & BP )
{
cs_set_user_bpammo(id, CSW_WEAPON, iBPAmmo[CSW_WEAPON])
}

return 1
}

sc00p
28.03.2013, 18:49
Was soll das sein? :O

Kia
30.03.2013, 19:18
set_weapon_fullammo

Rezept für Kartoffelkuchen.