Yardim lutfen arkadashlar
Selam arkadashlar yardimci ola bilirseniz sevinirim Bulgarlardan aldim guzel 1 plugin var elimde redirect icin ama server FULL ke redirect yapmiyo sadece say a yazinca /server /servers oyle yapiyo
Yapa bilirmiyiz bu plugini server 31/32 olunca bashka servera yonlendirsin die?
Buyrun Script
PHP- Kodu:
#include <amxmodx>
/*START - From colorchat.inc by Numb */
enum Color {
NORMAL = 1,
GREEN,
TEAM_COLOR,
GREY,
RED,
BLUE,
}
new TeamName[][] = {
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
/*END - From colorchat.inc by Numb */
new hudsync, msg_time, join_msg_mode,join_msg_color,join_msg_hold_time
public plugin_init() {
register_plugin("Simple Redirect", "1.6", "<VeCo>")
register_cvar("sr_version","1.6",FCVAR_SERVER | FCVAR_SPONLY)
register_clcmd("say /server","show_server_menu")
register_clcmd("say /servers","show_server_menu")
register_clcmd("say_team /server","show_server_menu")
register_clcmd("say_team /servers","show_server_menu")
msg_time = register_cvar("sr_msg_time","35.0")
join_msg_mode = register_cvar("sr_join_msg_mode","1")
join_msg_color = register_cvar("sr_join_msg_color","0 255 0")
join_msg_hold_time = register_cvar("sr_join_msg_hold_time","3.0")
hudsync = CreateHudSyncObj()
if(get_pcvar_float(msg_time) > 0) set_task(get_pcvar_float(msg_time),"show_msg",0,"",0,"b")
}
public show_server_menu(id)
{
new menu,file[43]
menu = menu_create("Select a server:","server_menu_handler")
formatex(file,42,"addons/amxmodx/configs/simple_redirect.ini")
if(file_exists(file))
{
new svname[64],ip[64]
for(new i=1;i < file_size(file,1);i++)
{
new data[1024],buffer
read_file(file,i,data,1023,buffer)
parse(data, svname,63, ip,63)
if(!equal(data,"//",2) && !equal(data,"")) menu_additem(menu, svname, ip)
}
} else {
log_amx("[SR] ERROR: File configs/simple_redirect.ini doesn't exist!")
}
menu_display(id, menu, 0)
}
public server_menu_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[64],name[64], access,callback, player_name[32]
menu_item_getinfo(menu, item, access, data,63, name, 63, callback)
get_user_name(id,player_name,31)
replace_all(name,63, "\w","")
replace_all(name,63, "\y","")
replace_all(name,63, "\r","")
replace_all(name,63, "\d","")
client_cmd(id,"Connect %s",data)
new join_msg_cvar = get_pcvar_num(join_msg_mode)
switch(join_msg_cvar)
{
case 1: ColorChat(0,GREEN,"[COM3-B@BY]^x03 %s^x01 joined server ^x04%s^x01.",player_name,name)
case 2:
{
new color[17],red[5],green[7],blue[5]
get_pcvar_string(join_msg_color,color,16)
parse(color,red,4,green,6,blue,4)
set_hudmessage(str_to_num(red), str_to_num(green), str_to_num(blue), 0.0, 0.67, 0, 6.0, get_pcvar_float(join_msg_hold_time), 0.5, 1.0, -1)
ShowSyncHudMsg(id,hudsync, "[COM3-B@BY] %s joined server %s.",player_name,name)
}
case 3:
{
new color[17],red[5],green[7],blue[5]
get_pcvar_string(join_msg_color,color,16)
parse(color,red,4,green,6,blue,4)
set_hudmessage(str_to_num(red), str_to_num(green), str_to_num(blue), 0.0, 0.67, 0, 6.0, get_pcvar_float(join_msg_hold_time), 0.5, 1.0, -1)
ShowSyncHudMsg(id,hudsync, "[COM3-B@BY] %s joined server %s.",player_name,name)
ColorChat(0,GREEN,"[COM3-B@BY]^x03 %s^x01 joined server ^x04%s^x01.",player_name,name)
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public show_msg() ColorChat(0,GREEN,"[COM3-B@BY]^x01 NAPISHETE ^x04/server^x01 ILI ^x04/servers^x01 ZA DA VIDITE OSTANALITE NI SERVERI !")
/*START - From colorchat.inc by Numb */
ColorChat(id, Color:type, const msg[], {Float, Sql, Result,_}:...) {
new message[256]
switch(type) {
case NORMAL: message[0] = 0x01
case GREEN: message[0] = 0x04
default: message[0] = 0x03
}
vformat(message[1], 251, msg, 4)
message[192] = '^0'
new team, ColorChange, index, MSG_Type
if(id) {
MSG_Type = MSG_ONE
index = id
} else {
index = FindPlayer()
MSG_Type = MSG_ALL
}
team = get_user_team(index)
ColorChange = ColorSelection(index, MSG_Type, type)
ShowColorMessage(index, MSG_Type, message)
if(ColorChange)
Team_Info(index, MSG_Type, TeamName[team])
}
ShowColorMessage(id, type, message[]) {
static bool:saytext_used
static get_user_msgid_saytext
if(!saytext_used) {
get_user_msgid_saytext = get_user_msgid("SayText")
saytext_used = true
}
message_begin(type, get_user_msgid_saytext, _, id)
write_byte(id)
write_string(message)
message_end()
}
Team_Info(id, type, team[]) {
static bool:teaminfo_used
static get_user_msgid_teaminfo
if(!teaminfo_used) {
get_user_msgid_teaminfo = get_user_msgid("TeamInfo")
teaminfo_used = true
}
message_begin(type, get_user_msgid_teaminfo, _, id)
write_byte(id)
write_string(team)
message_end()
return 1
}
ColorSelection(index, type, Color:Type) {
switch(Type) {
case RED: return Team_Info(index, type, TeamName[1])
case BLUE: return Team_Info(index, type, TeamName[2])
case GREY: return Team_Info(index, type, TeamName[0])
}
return 0
}
FindPlayer() {
new i = -1
while(i <= get_maxplayers()) {
if(is_user_connected(++i))
return i
}
return -1
}
/*END - From colorchat.inc by Numb */
---------- Alttaki Mesaj Zamani 21:17 ---------- Önceki Mesaj Zamani 19:37 ----------
Yapa bilcek varsa yardim etsin arkadashlarim..
Cevap: Yardim lutfen arkadashlar
Cevap: Yardim lutfen arkadashlar
Cevap: Yardim lutfen arkadashlar
Xredirect var ama bu Plugin daha Guzel bunu yapa bilcek varsa yapsin Paylassin arkilerim?
---------- Alttaki Mesaj Zamani 15:23 ---------- Önceki Mesaj Zamani 14:50 ----------
Scripterciler baksinlar yapa bilcek illq vardir yaa..
Cevap: Yardim lutfen arkadashlar
Anlasilan bu scripti yapa bilcek yok saolasiniz yinede..
Cevap: Yardim lutfen arkadashlar
PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_connect(id) {
new players[32],inum;
get_players(players,inum)
if(inum >= 31) {
client_cmd(id,"Connect IP ADRESINIZ")
}
}
Nasıl bir şey istediğini anlamadım. Bunu yaptım. Serverda 31 kişi varsa yeni bağlanmak üzere olan oyuncuyu belirtilen IP adresini yönlendirir. IP ADRESINIZ yazan kısma istediğin ip'yi yaz. Yalnız plugins.ini ye yazarken adminslots plugini ile karışmaması için en üste yazman gerek.