Raised This Month: $ Target: $400
 0% 

Server Crash When I Type %s In Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-25-2010 , 11:25   Server Crash When I Type %s In Chat
Reply With Quote #1

Code...

Last edited by #8 SickneSS; 05-28-2010 at 19:04.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 05-25-2010 , 11:51   Re: How I can select two player from two menus and give something from a bool
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
//Global
new bool:Player[33];
new 
PlayerIndex[33]
//Init
register_clcmd("say /menut","cmdMenuT");
//Menu
public cmdMenuT(id) {
 
 new 
players[32], playernum;
 
get_players(playersnum"ch""TERRORIST");//skip bots and hltv
 
new Menu menu_create("\rTerrorists \w:","HandlerT");
 
 for(new 
0;<= num;i++)
 {
  
player players[i];
   new 
name[32];
   
get_user_name(playername31);
   
   new 
temp[2];
   
num_to_str(i,temp,2);
   
   
menu_additem(Menu,name,temp);
 }
 
 
menu_display(id,Menu);
 return 
PLUGIN_HANDLED;
}
public 
HandlerT(id,Menu,item) {
 
 if(
item == MENU_EXIT)
 {
  
menu_destroy(Menu);
  return 
PLUGIN_HANDLED;
 }
 
 new 
iData[6];
 new 
iName[64];
 new 
Access;
 new 
Callback;
 
 
menu_item_getinfo(Menu,item,Access,iData,5,iName,63,Callback);
 
 new 
tempid str_to_num(iData)
 if(
is_user_alive(tempid))
 {
  new 
name[32];
  
get_user_name(id,name,31);
  
  
Player[tempid] = true;
  
client_print(0,print_chat,"ADMIN %s sets the Player %s to true",name,iName);
  
  
cmdMenuCT(id);
  
PlayerIndex[id] = tempid
 
}
 return 
PLUGIN_HANDLED;
}
public 
cmdMenuCT(id) {
 
 new 
players[32], playernum;
 
get_players(playersnum"ch""CT");//skip bots and hltv
 
new Menu menu_create("\rCounter-Terrorists \w:","HandlerCT");
 
 for(new 
0;<= num;i++)
 {
  
player players[i];
   new 
name[32];
   
get_user_name(player,name,31);
   
   new 
temp[2];
   
num_to_str(i,temp,2);
   
   
menu_additem(Menu,name,temp);
  }
 }
 
 
menu_display(id,Menu);
 return 
PLUGIN_HANDLED;
}
public 
HandlerCT(id,Menu,item) {
 
 if(
item == MENU_EXIT)
 {
  
menu_destroy(Menu);
  return 
PLUGIN_HANDLED;
 }
 
 new 
iData[6];
 new 
iName[64];
 new 
Access;
 new 
Callback;
 
 
menu_item_getinfo(Menu,item,Access,iData,5,iName,63,Callback);
 
 new 
tempid str_to_num(iData)
 if(
is_user_alive(tempid))
 {
  new 
name[32];
  
get_user_name(id,name,31);
  
  
Player[PlayerIndex[id]] = true;
  
client_print(0,print_chat,"ADMIN %s sets the Player %s to true",name,iName);
  
 }
 return 
PLUGIN_HANDLED;
}
//New Function
public Funtion(id) {
 if(
Player[id))

 
//Do this
}
return 
PLUGIN_HANDLED;

Untest ! if work tell me !!
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Old 05-25-2010, 12:52
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: Solved by my self
Old 05-25-2010, 14:46
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: New Title and New Problem :P
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-25-2010 , 14:56   Re: How I can select two player from two menus and give something from a bool
Reply With Quote #5

Quote:
Originally Posted by #8 SickneSS View Post
I Have a new problem,I don't know why,but when i use %s in chat,the server goes down and when i'm dead doesn't works the colours.
Where?
__________________
fysiks is offline
Old 05-25-2010, 14:56
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: New Title and New Problem :P
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-25-2010 , 15:00   Re: How I can select two player from two menus and give something from a bool
Reply With Quote #7

Quote:
Originally Posted by #8 SickneSS View Post
In Game
Thank you captain obvious! Where in the code.
__________________
fysiks is offline
Old 05-25-2010, 15:04
#8 SickneSS
This message has been deleted by #8 SickneSS. Reason: New Title and New Problem :P
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-25-2010 , 18:24   Re: Server Crash When I Type %s In Chat
Reply With Quote #9

New Title and New Problem
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-25-2010 , 18:33   Re: Server Crash When I Type %s In Chat
Reply With Quote #10

... Don't change your topic from one problem to another.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 05:24.


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