It is currently 19 Nov 2018 03:51



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 3 posts ] 
 [Cerere Plugin] no retry 
Author Message
Utilizator neserios (tepar)
Utilizator neserios (tepar)

Joined: 24 May 2018 13:32
Posts: 87
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Utilizator neserios (tepar)
Fond eXtream: 0
Imi poate oferi un plugin functionabil care sa dea ban 5 minute la jucatori care isi dau retry in consola? , gen retry sa fie interzis pe server. :)


28 Aug 2018 16:41
Profile multumesc WWW
Moderator
Moderator
User avatar

Joined: 25 Jan 2014 17:32
Posts: 1411
Location: Bucuresti
Detinator Steam: Da
Detinator server CS: 89.40.233.130
SteamID: Fix pe asta il stiu
Reputatie: Moderator
Membru Club eXtreamCS (7 luni)
1 avertisment scos (-2 luni club)
-1 warn (anti-tepari shop)
Fond eXtream: 0
Mutat in categoria potrivita + editat titlu


07 Nov 2018 22:57
Profile multumesc YIM WWW
Membru, skill +3
Membru, skill +3
User avatar

Joined: 24 Aug 2011 12:24
Posts: 1386
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Fond eXtream: 0
| Afiseaza codul
/*
NO RETRY 1.10

Plugin by Priski

Usage :
kicks and/or notifies users if they use retry

CVARS :
amx_retrytime - time in seconds to determine if retry was used ( default: 15 )
amx_retrykick - set to 1 if you want to kick retry users ( default: 0 )
amx_retryshow - set to 0 if you want to disable public announces about use of retry ( default: 0 )
amx_retrychat - show usage in playerchat ( default: 1 )
amx_retrymsg - message which is displayed after reconnect to user ( default: "No retry allowed here, %s" ) *
amx_retrykickmsg - reason when kicked ( default: "DO NOT USE RETRY COMMAND" )
amx_retrychatmsg - message in playerchat ( default: "%s was kicked: reconnect in %t seconds" ) *

* NOTE:
%s = players name
%t = same as in amx_retrytime

Changelog :

1.16 / 2005-10-17
- added new feature cvars:
amx_retrychat & amx_retrychatmsg
- better functionality
- hudmessages only to user who triggered

1.10 / 2005-08-17
- whole code rewritten
- bugs fixed

1.00 / 2005-08-15
- first release


*/
#include <amxmodx>
#include <amxmisc>

#define MAX_PLAYERS 32

new pID[MAX_PLAYERS][22]

public plugin_init() {
register_plugin("No retry","1.16","Priski")
register_cvar("amx_retrytime","60")
register_cvar("amx_retryban","1")
register_cvar("amx_retrybantime","5")
register_cvar("amx_retryshow","0")
register_cvar("amx_retrychat","1")

// %s is the player name, %t is amx_retrytime
register_cvar("amx_retrymsg","No retry allowed here, %s")
register_cvar("amx_retrybankmsg","Retry is not allowed!")
register_cvar("amx_retrychatmsg","%s was banned for %x minut%y: reconnect in %t seconds")
}

public client_putinserver(id) {
// no bots or admin immunity users
if ((is_user_bot(id)) || (get_user_flags(id)&ADMIN_IMMUNITY)) {
return PLUGIN_HANDLED
}

// gather info
new ip[22]
get_user_ip(id,ip,21)

for(new i = 1; i < MAX_PLAYERS; i++) {
if (equal(ip, pID[i], 21)) {

new name[34]
get_user_name(id, name, 33)

if (get_cvar_num("amx_retryshow")) {
new uID[1]
uID[0] = id
set_task(2.0,"showMsg", id, uID, 1)
}

if (get_cvar_num("amx_retrychat")) {
new txt[128]
get_cvar_string("amx_retrychatmsg", txt, 127)
new sec[6]
num_to_str(get_cvar_num("amx_retrytime"),sec, 5)

replace(txt, 127, "%s", name)
replace(txt, 127, "%t", sec)


new minute[32],time[32]
num_to_str(get_cvar_num("amx_retrybantime"),time,charsmax(time))
replace(txt,charsmax(txt),"%x",time)

formatex(minute,charsmax(minute),"%s",get_cvar_num("amx_retrybantime")==1?"":"e")
replace(txt,charsmax(txt),"%y",minute)

client_print( 0, print_chat, "[AMXX] %s", txt)
}

if (get_cvar_num("amx_retryban")) {
new uID[1]
uID[0] = get_user_userid(id)

// delayed ban
set_task(7.0,"ban",77,uID,1)
}

break
}
}

return PLUGIN_HANDLED;
}

public client_disconnect(id) {
// no bots or admin immunity users are in list
if ((is_user_bot(id)) || (get_user_flags(id)&ADMIN_IMMUNITY)) {
return PLUGIN_HANDLED; }

// gather info
new ip[22]
get_user_ip(id,ip,21)
new found = 0;

for(new i = 1; i < MAX_PLAYERS; i++) {
if (equal(ip, pID[i], 21)) {
// this user has been already kicked
found = 1
break
}
}

if (found == 0) {
for(new i = 1; i < MAX_PLAYERS; i++) {
if (pID[i][0] == 0) { // found empty slot
get_user_ip(id, pID[i], 21)
new aID[1]
aID[0] = i
set_task( get_cvar_float("amx_retrytime"), "cleanID", (id + MAX_PLAYERS),aID,1)

break
}
}
}
return PLUGIN_HANDLED;
}


public cleanID(i[]) {
pID[i[0]][0] = 0
}

public showMsg(pID[]) {
new txt[128]
get_cvar_string("amx_retrymsg", txt, 127)

new playername[34]
get_user_name(pID[0], playername, 33)

new sec[6]
num_to_str(get_cvar_num("amx_retrytime"),sec, 5)

replace(txt, 127, "%s", playername)
replace(txt, 127, "%t", sec)

set_hudmessage(255, 255, 255, 0.05, 0.72, 0, 5.0, 10.0, 2.0, 0.15, 3)
show_hudmessage(pID[0],txt)
}

public ban(id[]) {
new txt[128],ip[25]
get_cvar_string("amx_retrybanmsg", txt, 127)
get_user_ip(id[0],ip,charsmax(ip))
server_cmd("kick #%d ^"%s^";addip %s %i", id[0], txt,ip,get_cvar_num("amx_retrybantime"))
}


sau - https://forums.alliedmods.net/showthread.php?p=197148

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


07 Nov 2018 23:40
Profile multumesc ICQ YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 63 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group