Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Cerere plugin
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
1203
SkIrLlEx
[Mentally Stable]
Status: Offline
(since 03-12-2018 12:28)
Joined: 08 Mar 2014
Posts: 64
,
Topics: 16
Location:
AREA 51
Reputation:
121.2
Votes
: 6
Posted: 09-07-2016, 15:27:12
| Translate post to:
... (
Click for more languages
)
Nume: Reserved slot/kick player
Descriere plugin: Cand un admin vrea sa intre pe sv si nu poate ca acesta este full ! .. As dorii un plugin identic cu slot reservations .. dar sa fie un pic diferit sa nu tina sloturi libere ! Cand un admin vrea sa se conecteze sa dea afara un player de pe sv .. Si asa la fiecare admin care vrea sa se conecteze
Alte detalii: Precizez ! Sa nu tina slot liber ! Sa dea kick la un jucator cand adminul respectiv se connecteaza !
Exemplu: Serverul este 32/32 ! Si nu mai este loc .. adminul de fata vrea sa intre dar nu este loc .. Vreau ca pluginul sa dea afara un jucator ca adminul sa poata intra !
Multumesc !
0
0
Back to top
Dracke ♪
[Mentally Stable]
Status: Offline
(since 13-07-2016 09:43)
Joined: 11 May 2016
Posts: 7
,
Topics: 2
Location:
Italy
Reputation:
13.2
Votes
: 1
Posted: 13-07-2016, 11:38:46
| Translate post to:
... (
Click for more languages
)
Salut, nu cred ca exista astfel de plugin. Sau cel putin nu am auzit eu nici o data de el, este imposibil sa faca asa ceva..
Poate altii stiu..Bafta!
0
0
Back to top
SkIrLlEx
[Mentally Stable]
Status: Offline
(since 03-12-2018 12:28)
Joined: 08 Mar 2014
Posts: 64
,
Topics: 16
Location:
AREA 51
Reputation:
121.2
Votes
: 6
Posted: 16-07-2016, 15:36:58
| Translate post to:
... (
Click for more languages
)
Este fiindca am vazut pe unele servere .. ! Daca se poate va rog sa il faceti am mare nevoie de el
0
0
Back to top
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: 16-07-2016, 18:30:37
| Translate post to:
... (
Click for more languages
)
Poftim ar trebui sa mearga modifici tu flagul si numarul de playeri de la care sa dea deconect.
Spoiler:
#include <amxmodx>
#define PLUGIN "Kick Player Admin Connect"
#define AUTHOR "D3luxe"
#define VERSION "1.0"
#define ADMIN_FLAG ADMIN_RESERVATION
#define MAX_PLAYERS_NUMBER 32
new count_max;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public client_connect(id)
{
//verificam daca un admin se conecteaza si apelam functia
if(is_user_connecting(id) && get_user_flags(id) & ADMIN_FLAG)
loop_players();
}
public loop_players()
{
new id;
new Players[32],iNum;
//initializam count max
count_max = 0;
get_players(Players,iNum);
//cautam toti playeri sa vedem daca e numarul maxim atins
for(new i = 0; i < iNum;i++)
{
id = Players[i];
//verificam sa fie toti playeri conectati
if(is_user_connected(id))
count_max++;
}
//verificam daca count-ul nostru e egal cu nr max de playeri
if(count_max == MAX_PLAYERS_NUMBER)
{
//alegem un player random indexul lui mai exact
new iRandomPlayer = random_num(0,iNum-1);
choose_random(iRandomPlayer);
}
}
public choose_random(client)
{
/*verificam inca odata daca count_max == cu MAX_PLAYERS_NUMBER*/
if(count_max == MAX_PLAYERS_NUMBER)
{
//verificam sa nu fie admin
if(!(get_user_flags(client) & ADMIN_FLAG) && is_user_connected(client))
{
//ii dam kick si afisam mesajul.
new nume[33];
get_user_name(client,nume,charsmax(nume));
server_cmd( "kick #%d ^"Random kick ,un admin s-a conectat !^"", nume );
}else{
//recursivitate daca playerul nostru e admin rechemam functia si verificam iar playeri
loop_players();
}
}
}
Retired from Amxmodx
Last edited by
destroi112
on 05-08-2016, 10:46:18; edited 1 time in total
0
0
Back to top
SkIrLlEx
[Mentally Stable]
Status: Offline
(since 03-12-2018 12:28)
Joined: 08 Mar 2014
Posts: 64
,
Topics: 16
Location:
AREA 51
Reputation:
121.2
Votes
: 6
Posted: 22-07-2016, 14:57:14
| Translate post to:
... (
Click for more languages
)
E bun multumesc !
Puteti da T/C
P.S. Unde modific flag admin?
0
0
Back to top
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-07-2016, 18:54:08
| Translate post to:
... (
Click for more languages
)
#define ADMIN_FLAG ADMIN_RESERVATION
Aici pui ce flag vrei sa dea kick la conect cand e full , da vezi ca sunt sanse sa dea la un admin care nu are flagul asta de asta am pus slot ,daca vrei modific sa nu dea kick la cei cu slot.
Retired from Amxmodx
0
0
Back to top
SkIrLlEx
[Mentally Stable]
Status: Offline
(since 03-12-2018 12:28)
Joined: 08 Mar 2014
Posts: 64
,
Topics: 16
Location:
AREA 51
Reputation:
121.2
Votes
: 6
Posted: 22-07-2016, 20:28:33
| Translate post to:
... (
Click for more languages
)
Te rog sa modifici sa dea kick doar la cei care nu au grad la cei care au grad (Slot,vip,moderator etc.) sa nu dea
Si inca o rugaminte daca se poate .. Ca : Cand un admin intra pe sv cu flagul B s sa primeasca kick cel cu ping-ul cel mai mare
0
0
Back to top
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: 23-07-2016, 10:01:24
| Translate post to:
... (
Click for more languages
)
Atunci nu mai e random kick pentru ca e o conditie -_- ... Poftim ->
Spoiler:
#include <amxmodx>
#define PLUGIN "Kick Player Admin Connect"
#define AUTHOR "D3luxe"
#define VERSION "2.0"
#define ADMIN_FLAG ADMIN_RESERVATION //flagul adminului care intra
#define ADMIN_NOKICK ADMIN_RESERVATION //flagul adminului care nu ia kick cand se alege playerul cu ping
#define MAX_PLAYERS_NUMBER 32 // numarul de playeri la care un player este scos cand intra un admin pe server_cmd
new HighPingPlayer,maxim;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public client_connect(id)
{
if(is_user_connecting(id) && get_user_flags(id) & ADMIN_FLAG)
calc_players();
}
public calc_players()
{
new id;
new Players[32],iNum;
//initializam count max
new count_max = 0;
get_players(Players,iNum);
//cautam toti playeri sa vedem daca e numarul maxim atins
for(new i = 0; i< iNum;i++)
{
id = Players[i];
//verificam sa fie toti playeri conectati aici se pun si admini
if(is_user_connected(id))
count_max++;
}
//verificam daca count-ul nostru e egal cu nr max de playeri
if(count_max == MAX_PLAYERS_NUMBER)
{
//alegem un player random
loop_players();
}
}
public loop_players()
{
new id;
new Players[32],iNum;
get_players(Players,iNum);
maxim = -1;
//primul loop verificam pingul maxim
for(new i = 0; i< iNum;i++)
{
id = Players[i];
if(!is_user_connected(id))
continue;
if(get_user_flags(id) & ADMIN_NOKICK)
continue;
//le punem in loop pentru a verifica pentru fiecare player dupa care se va reseta
new ping,loss;
get_user_ping(id,ping,loss);
//o functie simpla verifica daca pingul playerului este mai mare ca maximul
if(ping > maxim)
maxim = ping;
}
//al 2-lea loop verificam playeri care au pingul maxim.Ultimul player cu cel mai mare ping v-a primi kick
for(new i = 0; i< iNum;i++)
{
id = Players[i];
if(!is_user_connected(id))
continue;
if(get_user_flags(id) & ADMIN_NOKICK)
continue;
new ping,loss;
get_user_ping(id,ping,loss);
//verificam din nou pingul si il comparam cu maximul aflat inainte si stocam playerul
if(maxim == ping)
HighPingPlayer = id;
}
if(HighPingPlayer && is_user_connected(HighPingPlayer))
{
new nume[33];
get_user_name(HighPingPlayer,nume,charsmax(nume));
server_cmd( "kick #%d ^"Ping kick ,un admin s-a conectat !^"", nume );
}else{
//recall loop if HighPingPlayer nu exista si caulculam iar playeri si verificam
calc_players();
}
}
Ambele variante sunt pt flagul b.Ce ti-am dat inainte da kick random iar asta da kick playerului cu ping mai mare .
Retired from Amxmodx
Last edited by
destroi112
on 05-08-2016, 10:49:47; edited 1 time in total
0
0
Back to top
SkIrLlEx
[Mentally Stable]
Status: Offline
(since 03-12-2018 12:28)
Joined: 08 Mar 2014
Posts: 64
,
Topics: 16
Location:
AREA 51
Reputation:
121.2
Votes
: 6
Posted: 23-07-2016, 18:58:59
| Translate post to:
... (
Click for more languages
)
Voi verifica cu ping mare sper sa mearga
Mersi momentant
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
destroi112
, 25 July 2016 02:15
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 30-11-2024, 02:50:06
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