Quote:
Originally Posted by Doc-Holiday
Whats the warning?
PHP Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich>
const OFFSET_PRIMARYWEAPON = 116; const OFFSET_C4_SLOT = 372;
StripUserWeapons(id) { new iC4Ent = get_pdata_cbase(id, OFFSET_C4_SLOT); if( iC4Ent > 0 ) { set_pdata_cbase(id, OFFSET_C4_SLOT, FM_NULLENT); }
strip_user_weapons(id); give_item(id, "weapon_knife"); set_pdata_int(id, OFFSET_PRIMARYWEAPON, 0);
if( iC4Ent > 0 ) { entity_set_int(id, EV_INT_weapons, entity_get_int(id, EV_INT_weapons) | (1<<CSW_C4)); set_pdata_cbase(id, OFFSET_C4_SLOT, iC4Ent); cs_set_user_bpammo(id, CSW_C4, 1); cs_set_user_plant(id, 1); } return PLUGIN_HANDLED; }
This stock is from Conor If the player has the C4 it will give him the c4 back so that you dont strip that.. and of course the knife also
|
that warning:
and line 144 is that one:
PHP Code:
strip_user_weapons(player)
And tried that code:
PHP Code:
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_G)
{
strip_user_weapons( player)
give_item(player, "weapon_deagle")
give_item(player, "ammo_50ae")
give_item(player, "ammo_50ae")
give_item(player, "ammo_50ae")
give_item(player, "weapon_knife")
if (!get_pcvar_num(g_menu_active))
return PLUGIN_CONTINUE
if(CurrentRound >= 3)
{
Showrod(player);
}
}
}
and I didn't have anything, just deagle... even knife was deleted, like the menu that usually shows on the top-left of the screen was deleted too... Like when you choosing between knife and primary weapon it shows you a yellow menu on the top, and with that code it didn't show me anything...
Can anyone help me to fix that...