Raised This Month: $60 Target: $400
 15% 

[req] Server_menu edit plizz


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FLOY
Member
Join Date: Dec 2013
Location: I love to www.steam.lv
Old 01-14-2020 , 12:13   [req] Server_menu edit plizz
Reply With Quote #1

Quote:
#include < amxmodx >

enum _:Serv_Base {
Server_Caption[128],
Server_IP[33]
};

new const sz_file[]="addons/amxmodx/configs/servers_list.ini";

new Array:g_Messages,g_Serv[Serv_Base];

public plugin_init(){
register_plugin("Multi Server Menu","1.0","Seroff");
register_clcmd("say /server","client_msg");
register_clcmd("say_team /server","client_msg");
}

public plugin_cfg()
{
g_Messages=ArrayCreate(Serv_Base);
new file = fopen(sz_file, "rt"),buffer[256];
if(!file) return set_fail_state("File ^"addons/amxmodx/configs/servers_list.ini^" not found");
while(file && !feof(file))
{
fgets(file, buffer, charsmax(buffer));
if(buffer[0]=='"')
{
parse(buffer, g_Serv[Server_Caption], 127, g_Serv[Server_IP], 32);
ArrayPushArray(g_Messages,g_Serv);
}
}
return fclose(file);
}

public client_msg(id){
new i,msg[160],i_m[10];
new g_Menu = menu_create("\wСписок \rсерверов\d:", "menu_handler");
for(i=0;i<ArraySize(g_Messages);i++){
num_to_str(i+1, i_m,sizeof(i_m)-1);
ArrayGetArray(g_Messages, i, g_Serv);
formatex(msg,sizeof(msg)-1,"\y %s \r- \w ip\d:\r %s",g_Serv[Server_Caption],g_Serv[Server_IP]);
menu_additem(g_Menu, msg, i_m,0);

}
menu_setprop(g_Menu, MPROP_NEXTNAME, "Next");
menu_setprop(g_Menu, MPROP_BACKNAME, "Back");
menu_setprop(g_Menu, MPROP_EXITNAME, "Exit");
menu_setprop(g_Menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, g_Menu, 0);
return 1;
}

public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu);
return 1;
}
new s_Data[6], s_Name[64], i_Access, i_Callback;
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback);
new i_Key = str_to_num(s_Data);
ArrayGetArray(g_Messages, -1+i_Key, g_Serv);
console_cmd(id,"connect %s",g_Serv[Server_IP]);
menu_destroy(menu)
return 1
}
Can add for see map and players
Server webiste server ip and map and players 21/32
And chat tekst and hud tekst with dis https://counterstrikec4.ucoz.com/ima...ect-server.jpg
__________________
homepage:steam.lv
topsites:top.steam.lv

Last edited by FLOY; 01-14-2020 at 12:14.
FLOY is offline
Send a message via Skype™ to FLOY
Shitty
Member
Join Date: Sep 2019
Old 01-14-2020 , 16:37   Re: [req] Server_menu edit plizz
Reply With Quote #2

Just search and you will get it.. (SEARCH)


Quote:
Originally Posted by FLOY View Post
And chat tekst and hud tekst
Text*
__________________
Quote:
Originally Posted by OciXCrom View Post
WhAt Is WaTeRing aNd TowErInG?!

Last edited by Shitty; 01-14-2020 at 19:01.
Shitty is offline
Reply


Thread Tools
Display Modes

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 04:04.


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