AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bollnas Course Maker weapons add (https://forums.alliedmods.net/showthread.php?t=216982)

ewew 05-28-2013 10:46

Bollnas Course Maker weapons add
 
Please help with this....http://s1.uploads.ru/RyFKA.png
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;
}
http://s1.uploads.ru/P6kBO.pnghttp://s1.uploads.ru/X1xuk.pnghttp://s1.uploads.ru/f7xCb.png

SpeeDeeR 05-28-2013 12:49

Re: Bollnas Course Maker weapons add
 
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.

ewew 05-29-2013 12:08

Re: Bollnas Course Maker weapons add
 
Thank you very much!)


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

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