Raised This Month: $ Target: $400
 0% 

Bollnas Course Maker weapons add


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ewew
New Member
Join Date: Nov 2010
Old 05-28-2013 , 10:46   Bollnas Course Maker weapons add
Reply With Quote #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;
}
ewew is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 05-28-2013 , 12:49   Re: Bollnas Course Maker weapons add
Reply With Quote #2

You are missing EOS (;) on lines 1379 and 1427.
If you want to avoid farder mistakes of this kind remove #pragma semicolon from your code.

Last edited by SpeeDeeR; 05-28-2013 at 12:50.
SpeeDeeR is offline
ewew
New Member
Join Date: Nov 2010
Old 05-29-2013 , 12:08   Re: Bollnas Course Maker weapons add
Reply With Quote #3

Thank you very much!)
ewew is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode