Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[PLUGIN Cs1.6] RadioMenu
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins
Author
Message
1267
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 22-08-2016, 19:00:03
| Translate post to:
... (
Click for more languages
)
Nume Plugin : RadioMenu
Descriere : Prin comanda /radio in chat afiseaza un meniu cu mai multe radiouri .
Se modifica de aici dupa bunul plac
->
Code:
#define MaxRadio 4 //nr max de radio-uri pe care il vrei
new const RadioStuff[MaxRadio][Radio] =
{
//Nume Locatie on Locatie Off
{ "Radio1","radio1_on","radio1_off" },
{ "Radio2","radio2_on","radio2_off" },
{ "Radio3","radio3_on","radio3_off" },
{ "Radio4","radio4_on","radio4_off" }
};
new const NumeServer[] = "Freakz";//numele serverului
Locatia tuturor fisierelor html trebuie sa fie
: addons\amxmodx\configs\radio_menu
altfel pluginul nu va merge.
Autor : D3luxe(eu)
Download :
Spoiler:
/* Script generated by Pawn Studio */
#include <amxmodx>
#define PLUGIN "Radio Menu"
#define AUTHOR "D3luxe"/*nu modifica aici ca ma supar*/
#define VERSION "1.0"
#define MaxRadio 4 //nr max de radio-uri pe care il vrei
enum Radio
{
Name[128],
PathON[128],
PathOFF[128]
};
new const RadioStuff[MaxRadio][Radio] =
{
//Nume Locatie on Locatie Off
{ "Radio1","radio1_on","radio1_off" },
{ "Radio2","radio2_on","radio2_off" },
{ "Radio3","radio3_on","radio3_off" },
{ "Radio4","radio4_on","radio4_off" }
};
new const NumeServer[] = "Freakz";//numele serverului
new selected_radio[33];
new bool:on_radio[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /radio","radio_menu");
check_radio();
// Add your own code here
}
//reset all la connect & disconnect
public client_putinserver(id)
{
selected_radio[id] = -1;
on_radio[id] = false;
}
public client_disconnect(id)
{
selected_radio[id] = -1;
on_radio[id] = false;
}
//meniul radio
public radio_menu(id)
{
new count = 0;
static szText[ 555 char ],szNumber[10];
formatex(szText,charsmax(szText),"Radio Menu %s :",NumeServer);
new menu = menu_create(szText, "radio_handler");
for(new i = 0; i < sizeof(RadioStuff) ; i++)
{
count++;
num_to_str( i, szNumber, charsmax( szNumber ));
if(selected_radio[id] == i && on_radio[id])
{
formatex( szText, charsmax( szText ),"\r%s \w[\rPornit\w]",RadioStuff[i][Name]);
}else
formatex( szText, charsmax( szText ),"\r%s",RadioStuff[i][Name]);
}
menu_additem(menu,szText,szNumber, 0);
if(count == 0)
{
ChatColor(id,"!g[%s] !yNu este nici un radio disponibil.",NumeServer);
return PLUGIN_HANDLED;
}
menu_display( id, menu, 0);
return PLUGIN_HANDLED;
}
public radio_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
static data[6], name[64], acs, cllbck;
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck);
if(selected_radio[id] == str_to_num(data))
{
on_radio[id] = !on_radio[id];
}else{
if(on_radio[id])
{
ChatColor(id,"!g%s !yDeja asculti !g%s !yopreste-l mai intai pentru a asculta alt radio.",NumeServer,RadioStuff[selected_radio[id]][Name]);
return PLUGIN_HANDLED;
}
selected_radio[id] = str_to_num(data);
on_radio[id] = true;
}
toggle_radio(id);
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public toggle_radio(id)
{
if(selected_radio[id] <= -1)
return PLUGIN_HANDLED;
new xD3l[128];
formatex(xD3l,charsmax(xD3l),"addons\amxmodx\configs\radio_menu\%s.html",on_radio[id]? RadioStuff[selected_radio[id]][PathON] : RadioStuff[selected_radio[id]][PathOFF]);
show_motd(id,xD3l,"RadioToggle");
return PLUGIN_HANDLED;
}
public check_radio()
{
if(!equal(AUTHOR,"D3luxe"))
{
new D3luxe[128];
formatex(D3luxe,charsmax(D3luxe),"Fake Author %s , pluginul nu va merge.",AUTHOR);
set_fail_state(D3luxe);
}
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
PS:Nu am .html-urile acelea le faceti si voi..
Retired from Amxmodx
1
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins
The time now is 10-01-2025, 20:39:11
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details