Raised This Month: $ Target: $400
 0% 

classes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-21-2005 , 14:37  
Reply With Quote #7

i tested the plugin, when freezetime is over it shows the menu like normal, but it does this every round even if i choosed sniper last round, i tested with all classes

this is what i got now:

Code:
 //----------------------------------------------------------------------------------------------  #include <amxmodx>  #include <amxmisc>  #include <fun>  #include <cstrike>  //----------------------------------------------------------------------------------------------  new bool:Sniper[33] = false  new bool:Engineer[33] = false  new bool:Medic[33] = false  new bool:NoClass[33] = false  //----------------------------------------------------------------------------------------------  public plugin_init()  {     register_plugin("Classes","0.1","Belsebub")     register_logevent("StartRound",2,"1=Round_Start")     register_menucmd(register_menuid("Class Menu"),1023,"actionMenu")     register_clcmd("say /changeclass","showMenu",0,": shows class menu")  }  //----------------------------------------------------------------------------------------------  public StartRound()  {     for(new id = 0; id < get_maxplayers(); id++)     {         if(Sniper[id] == false || Engineer[id] == false || Medic[id] == false || NoClass[id] == false)         {             showMenu(id)             return PLUGIN_CONTINUE         }         if(Sniper[id] == true)         {             set_user_maxspeed(id, 2.0)             give_item(id, "weapon_scout")             set_user_footsteps(id,1)         }         if(Engineer[id] == true)         {             set_user_health(id,150)         }         if(Medic[id] == true)         {             set_user_health(id,200)         }     }     return PLUGIN_HANDLED  }  //----------------------------------------------------------------------------------------------  public actionMenu(id,key)  {     switch(key)     {         case 0:         {             Sniper[id] = true             Engineer[id] = false             Medic[id] = false             NoClass[id] = false         }         case 1:         {             Sniper[id] = false             Engineer[id] = true             Medic[id] = false             NoClass[id] = false         }         case 2:         {             Sniper[id] = false             Engineer[id] = false             Medic[id] = true             NoClass[id] = false         }         case 3:         {             Sniper[id] = false             Engineer[id] = false             Medic[id] = false             NoClass[id] = true         }     }     return PLUGIN_HANDLED  }  //----------------------------------------------------------------------------------------------  public showMenu(id)  {     new szMenuBody[512]     new keys     new len = format(szMenuBody, 511, "\yClass Menu:^n" )     len += format( szMenuBody[len], 511-len, "^n\w1. Sniper" )     len += format( szMenuBody[len], 511-len, "^n\w2. Engineer" )     len += format( szMenuBody[len], 511-len, "^n\w3. Medic" )     len += format( szMenuBody[len], 511-len, "^n\w4. No Class" )     len += format( szMenuBody[len], 511-len, "^n^n\w5. Exit" )     keys = (1<<0|1<<1|1<<2|1<<3|1<<4)     show_menu( id, keys, szMenuBody, -1 )     return PLUGIN_HANDLED  }  //--------------------------------------------------------------------------------------------
Belsebub is offline
 



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 13:58.


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