I wanted to release my Class Menu ive made took me forever ! im sorry if wrong section. Enjoy anyways bugs just tell me. My first coding ive ever done so please dont get me wrong!
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd( "say /class", "ClassMenu" );
}
public ClassMenu(id)
{
new menu =
menu_create("\rClass Menu :", "menu_handler");
{
case 1:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Leone^x03 ^x04[Shotgun][Deagle][HE Grenade]^x04");
give_item(id, "weapon_xm1014");
give_item(id, "weapon_deagle");
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo( id, CSW_XM1014, 200 );
cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
}
case
2:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class^x03 Commando^x03 ^x04[Dak Dak][Usp][HE Grenade]^x04");
give_item(id, "weapon_sg550");
give_item(id, "weapon_usp");
give_item(id, "weapon_flashbang");
cs_set_user_bpammo( id, CSW_SG550, 200 );
cs_set_user_bpammo( id, CSW_USP, 200 );
}
case 3:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Machine Gun^x03 ^x04[Mp5][Glock][Smoke Grenade]^x04");
give_item(id, "weapon_mp5navy");
give_item(id, "weapon_glock18");
give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo( id, CSW_MP5NAVY, 200 );
cs_set_user_bpammo( id, CSW_GLOCK18, 200 );
}
case
4:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Rambo^x03 ^x04[Ak47][Five-Seven][HE Grenade]^x04");
give_item(id, "weapon_ak47");
give_item(id, "weapon_fiveseven");
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo( id, CSW_AK47, 200 );
cs_set_user_bpammo( id, CSW_FIVESEVEN, 200 );
}
case 5:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Schmidt^x03 ^x04[Scout][Deagle][Flash Bang]^x04");
give_item(id, "weapon_scout");
give_item(id, "weapon_deagle");
give_item(id, "weapon_flashbang");
cs_set_user_bpammo( id, CSW_SCOUT, 200 );
cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
}
case
6:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Krieg^x03 ^x04[Krieg 552][Usp][Smoke Grenade]^x04");
give_item(id, "weapon_sg552");
give_item(id, "weapon_usp");
give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo( id, CSW_SG552, 200 );
cs_set_user_bpammo( id, CSW_USP, 200 );
}
case
7:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03IDF Defender^x03 ^x04[Galil][Glock][He Grenade]^x04");
give_item(id, "weapon_galil");
give_item(id, "weapon_glock18");
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo( id, CSW_GALIL, 200 );
cs_set_user_bpammo( id, CSW_GLOCK18, 200 );
}
case
8:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Rifle^x03 ^x04[Sniper][Five-Seven][Flash Bang]^x04");
give_item(id, "weapon_awp");
give_item(id, "weapon_fiveseven");
give_item(id, "weapon_flashbang");
cs_set_user_bpammo( id, CSW_AWP, 200 );
cs_set_user_bpammo( id, CSW_FIVESEVEN, 200 );
}
case
9:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Maverick^x03 ^x04[M4a1][Deagle][Smoke Grenade]^x04");
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo( id, CSW_M4A1, 200 );
cs_set_user_bpammo( id, CSW_DEAGLE, 200 );
}
case
10:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class^x03 Clarion^x03 ^x04[Famas][Usp][He Grenade]^x04");
give_item(id, "weapon_famas");
give_item(id, "weapon_usp");
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo( id, CSW_FAMAS, 200 );
cs_set_user_bpammo( id, CSW_USP, 200 );
}
case
11:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class^x03 Bullpup^x03 ^x04[Aug][Glock][Flash Bang]^x04");
give_item(id, "weapon_aug");
give_item(id, "weapon_glock18");
give_item(id, "weapon_flashbang");
cs_set_user_bpammo( id, CSW_AUG, 200 );
cs_set_user_bpammo( id, CSW_GLOCK18, 200 );
}
}
}
First of all buddy... you didnt MAKE this plugin.... you used code from my plugin i made for you as you asked me for a classes menu with HUD display... all you have done is take away the hud and just leave the menu.
plus this is the Code/Tutorial section Not new plugin submissions.
next time you think of releasing a plugin that is 90% my code please add me as Author
public client_connect(id)
{
ClassName[id] = CLASS_NONE;
// USE THIS TO SHOW CLASS MENU ONCE AFTER CONNECTING TO SERVER
// THIS COULD CAUSE PROBLEMS IF PLAYER JOINS TEAM AND DOESNT SPAWN STAYS DEAD TILL NEXT ROUND!
//set_task(10.0, "ClassMenu", id);
// UNCOMMENT ABOVE TO USE = // <= DELETE THESE
}
/* THIS STARTS THE HUD MESSAGE LOOP */
public fwd_Player_Spawn(id)
{
set_task(1.0, "ShowHud", id);
ClassName[id] = CLASS_NONE;
strip_user_weapons(id);
give_item(id, "weapon_knife");
ClassMenu(id); // USE THIS TO SHOW MENU EVERY SPAWN ONLY
}
/* THIS SHOWS HUD PLAYER CLASS AND RE LOOPS IT */
public ShowHud(id)
{
set_hudmessage(255, 255, 0, 0.01, 0.18, 0, _, 1.0, _, _, 1);
show_hudmessage(id, "Class: %s", CLASSES[ClassName[id]]);
set_task(1.0, "ShowHud", id);
}
/* CLASS MENU */
public ClassMenu(id)
{
new menu = menu_create("\rClass Menu :^n\yMade By Cheese.", "menu_handler");