Raised This Month: $51 Target: $400
 12% 

Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
caked
Member
Join Date: Dec 2012
Old 12-18-2012 , 19:50   Help!
Reply With Quote #1

i put dis in my plugin im making got an error saying undefined symbol "Call_SOME_MENU"

PHP Code:
 
#include <amxmodx>

new bool:menu_showed[33];

 
public 
client_connect(id)
{
  
menu_showed[id]=false;
}

 
public 
ClCmd_JoinTeamid 

   
if(!
menu_showed[id])
          
Call_SOME_MENUid );
    return 
PLUGIN_CONTINUE 
}

 
Some_menu_handler(id,menu,key)
{
menu_showed[id]=true;

 

caked is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-18-2012 , 20:13   Re: Help!
Reply With Quote #2

And "Call_SOME_MENU" represents what?
OvidiuS is offline
Send a message via Skype™ to OvidiuS
caked
Member
Join Date: Dec 2012
Old 12-18-2012 , 20:25   Re: Help!
Reply With Quote #3

i dont know if u could help me fix it?
caked is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-18-2012 , 20:29   Re: Help!
Reply With Quote #4

Well, this is scripting section, you should know what you are posting.
If you are seeking for a plugin post in Suggestions/Requests section.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
caked
Member
Join Date: Dec 2012
Old 12-18-2012 , 20:30   Re: Help!
Reply With Quote #5

it represents my menu im doing class menu
caked is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-18-2012 , 20:33   Re: Help!
Reply With Quote #6

Post the full code...
Some functions are missing.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
caked
Member
Join Date: Dec 2012
Old 12-18-2012 , 20:38   Re: Help!
Reply With Quote #7

#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>
#include <fun>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new bool:menu_showed[33];
public client_connect(id)
{
menu_showed[id]=false;
}
public ClCmd_JoinTeam( id )
{
if(!menu_showed[id])
Call_SOME_MENU( id );
return PLUGIN_CONTINUE
}
Some_menu_handler(id,menu,key)
{
menu_showed[id]=true;
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd( "say /class", "ClassMenu" );
}
public ClassMenu(id)
{
new menu = menu_create("\rClass Menu :^n\yMade By caked.", "menu_handler");
menu_additem(menu, "\wLeone", "1", 0);
menu_additem(menu, "\wCommando", "2", 0);
menu_additem(menu, "\wMachine Gun", "3", 0);
menu_additem(menu, "\wRambo", "4", 0);
menu_additem(menu, "\wSchmidt", "5", 0);
menu_additem(menu, "\wKrieg", "6", 0);
menu_additem(menu, "\wIDF Defender", "7", 0);
menu_additem(menu, "\wRifle", "8", 0);
menu_additem(menu, "\wMaverick", "9", 0);
menu_additem(menu, "\wClarion", "10", 0);
menu_additem(menu, "\wBullpup", "11", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public menu_handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
case 2:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class^x03 Commando^x03 ^x04[Dak Dak][Deagle][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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
case 10:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Clarion^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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
case 11:
{
ColorChat(id, RED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Bullpup^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 );
ColorChat(id, BLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
}
}
}
caked is offline
tomba2k
Junior Member
Join Date: Jan 2008
Location: Zagreb, Croatia
Old 01-04-2013 , 22:27   Re: Help!
Reply With Quote #8

if i've guessed correctly what you had in mind:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>
#include <fun>

#define PLUGIN "class menu by caked"
#define VERSION "1.0"
#define AUTHOR "caked"

new bool:menu_showed[33];
public 
client_connect(id) {
  
menu_showed[id]=false;
}

public 
ClCmd_JoinTeamid )  { 
  if(!
menu_showed[id])
  
ClassMenuid );
  return 
PLUGIN_CONTINUE 
}

public 
plugin_init() {
  
register_plugin(PLUGINVERSIONAUTHOR)
  
register_clcmd"say /class""ClassMenu" );
  
register_clcmd("jointeam""ClCmd_JoinTeam"0"Team-Menu")
}

public 
ClassMenu(id) {
  new 
menu menu_create("\rClass Menu :^n\yMade By caked.""menu_handler");
  
menu_additem(menu"\wLeone""1"0);
  
menu_additem(menu"\wCommando""2"0);
  
menu_additem(menu"\wMachine Gun""3"0);
  
menu_additem(menu"\wRambo""4"0);
  
menu_additem(menu"\wSchmidt""5"0);
  
menu_additem(menu"\wKrieg""6"0);
  
menu_additem(menu"\wIDF Defender""7"0);
  
menu_additem(menu"\wRifle""8"0);
  
menu_additem(menu"\wMaverick""9"0);
  
menu_additem(menu"\wClarion""10"0);
  
menu_additem(menu"\wBullpup""11"0);
  
menu_setprop(menuMPROP_EXITMEXIT_ALL);
  
menu_display(idmenu0);
}

public 
menu_handler(idmenuitem) {
  if( 
item == MENU_EXIT ) {
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
  }
  new 
data[6], iName[64];
  new 
accesscallback;
  
menu_item_getinfo(menuitemaccessdata,5iName63callback);
  new 
key str_to_num(data);
  switch(
key) {
    case 
1: {
      
ColorChat(idRED,"^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_bpammoidCSW_XM1014200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
2: {
      
ColorChat(idRED,"^x04[ Class ]^x01 You Have Chosen The Class^x03 Commando^x03 ^x04[Dak Dak][Deagle][HE Grenade]^x04");
      
give_item(id"weapon_sg550");
      
give_item(id"weapon_usp");
      
give_item(id"weapon_flashbang");
      
cs_set_user_bpammoidCSW_SG550200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
3: {
      
ColorChat(idRED,"^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_bpammoidCSW_MP5NAVY200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
4: {
      
ColorChat(idRED,"^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_bpammoidCSW_AK47200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
5: { 
      
ColorChat(idRED,"^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_bpammoidCSW_SCOUT200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
6: {
      
ColorChat(idRED,"^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_bpammoidCSW_SG552200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
7: {
      
ColorChat(idRED,"^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_bpammoidCSW_GALIL200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
8: {
      
ColorChat(idRED,"^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_bpammoidCSW_AWP200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
9: {
      
ColorChat(idRED,"^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_bpammoidCSW_M4A1200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
10: {
      
ColorChat(idRED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Clarion^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_bpammoidCSW_FAMAS200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
    case 
11: {
      
ColorChat(idRED,"^x04[ Class ]^x01 You Have Chosen The Class ^x03Bullpup^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_bpammoidCSW_AUG200 );
      
ColorChat(idBLUE,"^x04[ Ammo ]^x01 Ammo : ^x03+200^x03");
    }
  }
  return 
PLUGIN_HANDLED;

__________________
...

Last edited by tomba2k; 01-04-2013 at 22:28.
tomba2k is offline
Send a message via MSN to tomba2k Send a message via Skype™ to tomba2k
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 08:03.


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