I'm trying to make a block for bcm4.
This block provides an AWP per round.
But the code is wrong, can someone fix it? THX
The Code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <cstrike>
#include <fun>
new bool:g_bawp[33];
case OBJECT_AWPBLOCK:
{
new Awp = user_has_weapon(plr, CSW_AWP, 1);
if(g_bawp[plr] )
if( get_user_team(plr, "", 0) == 1)
if(!Awp)
{
give_item(plr, "weapon_awp");
cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", plr), 1);
cs_set_user_bpammo(1, CSW_AWP, 0);
set_hudmessage(255, 0, 0, 0.05, 0.65, 0, 2.0, 2.0, 0.5, 0.1, -1);
show_hudmessage (plr, "YOU WON AN AWP!");
}
if( get_user_team(plr, "", 0) == 1)
if(Awp)
{
set_hudmessage(255, 0, 0, 0.05, 0.65, 0, 2.0, 2.0, 0.5, 0.1, -1);
show_hudmessage (plr, "JUST 1 AWP PER ROUND!");
}
g_bawp[plr] = true;
}