|
New Member
|

05-28-2013
, 10:46
Bollnas Course Maker weapons add
|
#1
|
Please help with this.... 
I want to add this code
Quote:
ActionAwp(id)
{
if ( !g_awp_used[id] )
{
if( cs_get_user_team(id) == CS_TEAM_T )
{
if ( is_user_alive(id) )
{
if(user_has_weapon(id, CSW_AWP))
{
if ( !g_has_hud_text[id] )
{
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nYou already have a awp", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
else
{
cs_set_weapon_ammo( give_item( id, "weapon_awp" ), 1 );
cs_set_user_bpammo( id, CSW_AWP, 0 );
new name[32];
get_user_name(id, name, 32);
BCM_Print(id, "^4%s^1 %s^3 were given a^1 awp^3 with^1 1^3 bullet!", prefix, name );
g_awp_used[id] = true
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nYou can only use this block once per round", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
}
else
{
if ( !g_has_hud_text[id] )
{
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nThis block can only be used by Terrorists", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
ActionDeagle(id)
{
if ( !g_deagle_used[id] )
{
if( cs_get_user_team(id) == CS_TEAM_T )
{
if ( is_user_alive(id) )
{
if(user_has_weapon(id, CSW_DEAGLE))
{
if ( !g_has_hud_text[id] )
{
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nYou already have a deagle", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
else
{
cs_set_weapon_ammo( give_item( id, "weapon_deagle" ), 1 );
cs_set_user_bpammo( id, CSW_DEAGLE, 0 );
new name[32];
get_user_name(id, name, 32);
BCM_Print(id, "^4%s ^1%s^3 were given a^1 deagle^3 with^1 1^3 bullet!", prefix, name );
g_deagle_used[id] = true
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nYou can only use this block once per round", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
}
else
{
if ( !g_has_hud_text[id] )
{
set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);
show_hudmessage(id, "%s %s^nThis block can only be used by Terrorists", PLUGIN_PREFIX, PLUGIN_VERSION );
}
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
|
 
|
|