Cerere modificare RetrySlay.

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

09 Jun 2021, 15:16

Salut, am acest plugin:
| Afiseaza codul
#include <amxmisc>

#define MAX_PLAYERS 32

new xID[MAX_PLAYERS][22]

public plugin_init() {
	register_plugin("No Retry With Slay", "1.0", "x")
 
	register_cvar("amx_retrytime","60")
	register_cvar("amx_retryslay","1")
	register_cvar("amx_showx","1")
	register_cvar("amx_slaymsg","1")
		
	return 1
}

public client_putinserver(id) 
{
	if ((is_user_bot(id)) || (get_user_flags(id) & ADMIN_IMMUNITY)){
		return 1
	}
	
	new ip[22]
	get_user_ip(id,ip,21)
	
	for(new i = 1; i < MAX_PLAYERS; i++) {
		if (equal(ip, xID, 21)) {
			
			new name[34]
			get_user_name(id, name, 33)
			
			if (get_cvar_num("amx_showx")) {
				new rID[1]
				rID[0] = id
				set_task(2.0, "msgx", id, rID, 1)
			}
						
			if (get_cvar_num("amx_retryslay")) {
				new rID[1]
				rID[0] = get_user_userid(id)
				
                                // Intarziere slay 			
				set_task(5.0, "x_cmd", 77, rID, 1)
				
			}
			
			break
		}
	}
	
	return 1;
}

public client_disconnect(id) {

	if ((is_user_bot(id))) {
	return 1; }

	new ip[22]
	get_user_ip(id,ip,21)
	new found = 0;
	
	for(new i = 1; i < MAX_PLAYERS; i++) {
		if (equal(ip, xID, 21)) {
			// acest jucator a primit deja slay
			found = 1
			break
		}
	}
	
	if (found == 0) {
		for(new i = 1; i < MAX_PLAYERS; i++) {
			if (xID[0] == 0) {	// slot gol gasit
				get_user_ip(id, xID, 21)
				new aID[1]
				aID[0] = i
				set_task( get_cvar_float("amx_retrytime"), "cleanID", (id + MAX_PLAYERS), aID, 1)
						
				break
			}
		}
	}
	return 1;
}


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

public msgx(xID[]) {
	new txt[128]
	get_cvar_string("amx_slaymsg", txt, 127)
	
	new playername[34]
	get_user_name(xID[0], playername, 33)
	
	new sec[6]
	num_to_str(get_cvar_num("amx_retrytime"), sec, 5)
	
	set_hudmessage(255, 0, 0, 0.0, 0.86, 1, 6.0, 20.0)
	show_hudmessage(xID[0], "Veti primi slay, deoarece v-ati reconectat pe server!")
	client_print(xID[0], print_chat, "Veti primi slay, deoarece v-ati reconectat pe server!")
	return 1
}

public x_cmd(id[]) {
	new txt[128]
	get_cvar_string("amx_slaymsg", txt, 127)
	server_cmd("amx_slay #%d ^"%s^"", id[0], txt)
}
si am erorile astea la compilare:
| Afiseaza codul
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

df28cb6d53517e21dbcc30c058238df3.sma(28) : error 048: array dimensions do not match
df28cb6d53517e21dbcc30c058238df3.sma(65) : error 048: array dimensions do not match
df28cb6d53517e21dbcc30c058238df3.sma(74) : error 033: array must be indexed (variable "xID")
df28cb6d53517e21dbcc30c058238df3.sma(75) : error 048: array dimensions do not match

4 Errors.
Could not locate output file df28cb6d53517e21dbcc30c058238df3.amx (compile failed).
Problema la el e ca nu da slay la admini cu imunitate, dar eu vreau sa primeasca toti care dau retry slay.
imi puteti modifica acest plugin va rog? PS: compilez online cu 1.8.2
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 495
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 91 times
Been thanked: 23 times

09 Jun 2021, 16:28

Cum ai probleme la compilare daca zici ca il ai pe sv si merge ?
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

09 Jun 2021, 16:48

N3v3rM1nd wrote:
09 Jun 2021, 16:28
Cum ai probleme la compilare daca zici ca il ai pe sv si merge ?
pai l-am luat de la un prieten ca l-a avut el pe sv si i-am zis sa ma ajute, din ce stiu eu nu dadea slay la admini ca au imunitate, i-am cerut sma-ul sa il modific si am vrut prima oara sa-l compilez si-mi da asta, ma poti ajuta?
User avatar
Sorinel
Fost moderator
Fost moderator
Posts: 4970
Joined: 25 Aug 2014, 20:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Christmas, A k c 3 n 7
Fond eXtream: 0
Location: Ploiesti
Been thanked: 14 times

09 Jun 2021, 22:53

User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

10 Jun 2021, 14:30

Salut, mersi ca ti-ai facut timp sa-mi editezi pluginu dar am 2probleme:
1. Nu da slay la playeri.
2. Nu da nici la admini.
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 495
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 91 times
Been thanked: 23 times

10 Jun 2021, 21:27

am mai aranjat putin codul , din moment ce aveai return in init...

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define MAX_IDS 32
#define DELAY_SLAY_TIME 30.0
#define IsPlayer(%1) (1 <= %1 <= get_maxplayers())

enum _:PlayerData
{
	szName[MAX_IDS + 1],
	szSteamID[30],
	szIP[22]
}

new g_ePlayerData[MAX_IDS + 1][PlayerData];
new PlayerSlot[MAX_IDS + 1][22];

public client_putinserver(id)
{
	if(get_user_flags(id) & ADMIN_IMMUNITY) return PLUGIN_CONTINUE;
	get_user_ip(id, g_ePlayerData[id][szIP], charsmax(g_ePlayerData[][szIP]));

	for(new i = 1; i < MAX_IDS; ++i)
	{
		if(equal(g_ePlayerData[i][szIP], PlayerSlot[i], charsmax(g_ePlayerData[][szIP])))
		{
			new  xAltID[1]; xAltID[0] = get_user_userid(id);

			set_task(5.0, "Slay", 77, xAltID, 1);
		}
		break;
	}
	return PLUGIN_HANDLED;
}


public client_disconnected(id)
{
	if(!IsPlayer(id)) return PLUGIN_HANDLED;
	if(get_user_flags(id) & ADMIN_IMMUNITY) return PLUGIN_CONTINUE;

	get_user_ip(id, g_ePlayerData[id][szIP], charsmax(g_ePlayerData[][szIP]));
	new PlayerSlotIndex = 0;

	for(new i = 1; i < MAX_IDS; ++i)
	{
		if(equal(g_ePlayerData[i][szIP], PlayerSlot[i], charsmax(g_ePlayerData[][szIP])))
		{PlayerSlotIndex = 1; break;}

	}

	if(PlayerSlotIndex == 0)
	{
		for(new z = 1; 1 < MAX_IDS; ++z)
		{
			if(PlayerSlot[z][0] == 0)
			{
				get_user_ip(id, PlayerSlot[z], charsmax(PlayerSlot));

				new AltID[1]; AltID[0] = z;
				set_task(DELAY_SLAY_TIME, "cleanID", (id + MAX_IDS), AltID, 1);
				break;
			}
		}
	}


	return PLUGIN_HANDLED;
}

public cleanID(param[])
{
	PlayerSlot[param[0]][0] = 0;
}

public Slay(param2[])	server_cmd("amx_slay #%d", param2[0]);

netestat dar ar trb sa mearga
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

10 Jun 2021, 23:06

N3v3rM1nd wrote:
10 Jun 2021, 21:27
am mai aranjat putin codul , din moment ce aveai return in init...

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define MAX_IDS 32
#define DELAY_SLAY_TIME 30.0
#define IsPlayer(%1) (1 <= %1 <= get_maxplayers())

enum _:PlayerData
{
	szName[MAX_IDS + 1],
	szSteamID[30],
	szIP[22]
}

new g_ePlayerData[MAX_IDS + 1][PlayerData];
new PlayerSlot[MAX_IDS + 1][22];

public client_putinserver(id)
{
	if(get_user_flags(id) & ADMIN_IMMUNITY) return PLUGIN_CONTINUE;
	get_user_ip(id, g_ePlayerData[id][szIP], charsmax(g_ePlayerData[][szIP]));

	for(new i = 1; i < MAX_IDS; ++i)
	{
		if(equal(g_ePlayerData[i][szIP], PlayerSlot[i], charsmax(g_ePlayerData[][szIP])))
		{
			new  xAltID[1]; xAltID[0] = get_user_userid(id);

			set_task(5.0, "Slay", 77, xAltID, 1);
		}
		break;
	}
	return PLUGIN_HANDLED;
}


public client_disconnected(id)
{
	if(!IsPlayer(id)) return PLUGIN_HANDLED;
	if(get_user_flags(id) & ADMIN_IMMUNITY) return PLUGIN_CONTINUE;

	get_user_ip(id, g_ePlayerData[id][szIP], charsmax(g_ePlayerData[][szIP]));
	new PlayerSlotIndex = 0;

	for(new i = 1; i < MAX_IDS; ++i)
	{
		if(equal(g_ePlayerData[i][szIP], PlayerSlot[i], charsmax(g_ePlayerData[][szIP])))
		{PlayerSlotIndex = 1; break;}

	}

	if(PlayerSlotIndex == 0)
	{
		for(new z = 1; 1 < MAX_IDS; ++z)
		{
			if(PlayerSlot[z][0] == 0)
			{
				get_user_ip(id, PlayerSlot[z], charsmax(PlayerSlot));

				new AltID[1]; AltID[0] = z;
				set_task(DELAY_SLAY_TIME, "cleanID", (id + MAX_IDS), AltID, 1);
				break;
			}
		}
	}


	return PLUGIN_HANDLED;
}

public cleanID(param[])
{
	PlayerSlot[param[0]][0] = 0;
}

public Slay(param2[])	server_cmd("amx_slay #%d", param2[0]);

netestat dar ar trb sa mearga
tot nu merge, nu reactioneaza cu nimic plugin-u...
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 495
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 91 times
Been thanked: 23 times

11 Jun 2021, 01:41

Nu are cum , pune-l primul in lista
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

11 Jun 2021, 13:31

N3v3rM1nd wrote:
11 Jun 2021, 01:41
Nu are cum , pune-l primul in lista
bro, ia testeaza-l tu sa vezi ca nu functioneaza.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3285
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 39 times
Been thanked: 499 times
Contact:

11 Jun 2021, 19:17

uite ceva mai bun & simplu

Code: Select all

#include <amxmodx>

#pragma tabsize 0

/* ========================================================================================================
 *         [ Plugin initiation ]
 * ======================================================================================================*/

const RETRY_DURATION = 60; //in s.

new Trie:g_tPlayer;

public plugin_init( ){
    register_plugin( "Anti retry","1.0b","Manu" );//sigur nu e el
    g_tPlayer = TrieCreate( );
}

public plugin_end( ) TrieDestroy( g_tPlayer );

/* ========================================================================================================
 *         [ Functions ]
 * ======================================================================================================*/

public client_putinserver( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ],iTime; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( TrieKeyExists( g_tPlayer,szIp ) ){
        TrieGetCell( g_tPlayer,szIp,iTime );
        if( get_systime( ) < iTime ){
            if(is_user_alive(iId)){
                user_silentkill(iId)
                client_print(iId,print_chat,"You have to wait %ds. before to reconnect",iTime - get_systime( ))
            } else server_cmd("kick #%d You have to wait %ds. before to reconnect",get_user_userid(iId),iTime - get_systime( ))
        } else TrieDeleteKey( g_tPlayer,szIp );
    }
}

public client_disconnect( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ]; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( !TrieKeyExists( g_tPlayer,szIp ) ) TrieSetCell( g_tPlayer,szIp,get_systime( ) + RETRY_DURATION );
}
Faceți cerere bine detaliată aici și respectând modelul dacă vreți ajutor.
Nu-mi mai dați add doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug la lista de „ignore”.
Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine(STEAM sau PM) dacă aveți o problemă/nelămurire în acest caz! (am cont doar aici!!)
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici, iar dacă sunt ceva probleme sau aveți dvs. probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se va posta la actual, doar dacă se găsește ceva critic/urgent de remediat, fiind coduri vechi, iar unele refăcute recent. NU MAI OFER SUPORT PENTRU ELE!(doar dacă nu e ceva critic/sau plătit)
* Nume pe cs1.6: eVoLuTiOn
* Atelierul meu - anunturi/lev-shop-t370037.html
INACTIV
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

12 Jun 2021, 14:41

L E V I N wrote:
11 Jun 2021, 19:17
uite ceva mai bun & simplu

Code: Select all

#include <amxmodx>

#pragma tabsize 0

/* ========================================================================================================
 *         [ Plugin initiation ]
 * ======================================================================================================*/

const RETRY_DURATION = 60; //in s.

new Trie:g_tPlayer;

public plugin_init( ){
    register_plugin( "Anti retry","1.0b","Manu" );//sigur nu e el
    g_tPlayer = TrieCreate( );
}

public plugin_end( ) TrieDestroy( g_tPlayer );

/* ========================================================================================================
 *         [ Functions ]
 * ======================================================================================================*/

public client_putinserver( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ],iTime; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( TrieKeyExists( g_tPlayer,szIp ) ){
        TrieGetCell( g_tPlayer,szIp,iTime );
        if( get_systime( ) < iTime ){
            if(is_user_alive(iId)){
                user_silentkill(iId)
                client_print(iId,print_chat,"You have to wait %ds. before to reconnect",iTime - get_systime( ))
            } else server_cmd("kick #%d You have to wait %ds. before to reconnect",get_user_userid(iId),iTime - get_systime( ))
        } else TrieDeleteKey( g_tPlayer,szIp );
    }
}

public client_disconnect( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ]; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( !TrieKeyExists( g_tPlayer,szIp ) ) TrieSetCell( g_tPlayer,szIp,get_systime( ) + RETRY_DURATION );
}
imi zici si mie cum setez cand un player moare si da retry sa moara in 2 secunde?
User avatar
wicK.
Membru, skill 0
Membru, skill 0
Posts: 28
Joined: 31 May 2021, 14:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: DR.DARKCS.RO
SteamID: wick20051
Fond eXtream: 0

12 Jun 2021, 17:19

L E V I N wrote:
11 Jun 2021, 19:17
uite ceva mai bun & simplu

Code: Select all

#include <amxmodx>

#pragma tabsize 0

/* ========================================================================================================
 *         [ Plugin initiation ]
 * ======================================================================================================*/

const RETRY_DURATION = 60; //in s.

new Trie:g_tPlayer;

public plugin_init( ){
    register_plugin( "Anti retry","1.0b","Manu" );//sigur nu e el
    g_tPlayer = TrieCreate( );
}

public plugin_end( ) TrieDestroy( g_tPlayer );

/* ========================================================================================================
 *         [ Functions ]
 * ======================================================================================================*/

public client_putinserver( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ],iTime; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( TrieKeyExists( g_tPlayer,szIp ) ){
        TrieGetCell( g_tPlayer,szIp,iTime );
        if( get_systime( ) < iTime ){
            if(is_user_alive(iId)){
                user_silentkill(iId)
                client_print(iId,print_chat,"You have to wait %ds. before to reconnect",iTime - get_systime( ))
            } else server_cmd("kick #%d You have to wait %ds. before to reconnect",get_user_userid(iId),iTime - get_systime( ))
        } else TrieDeleteKey( g_tPlayer,szIp );
    }
}

public client_disconnect( iId ){
    if(is_user_bot(id)||is_user_hltv(id)) return
    static szIp[ 35 ]; get_user_ip( iId,szIp,charsmax( szIp ) );
    if( !TrieKeyExists( g_tPlayer,szIp ) ) TrieSetCell( g_tPlayer,szIp,get_systime( ) + RETRY_DURATION );
}
bro cand il compilez arata asa:
| Afiseaza codul
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

9f569eca19007f5f62020b5fdb369ac8.sma(27) : error 088: number of arguments does not match definition
9f569eca19007f5f62020b5fdb369ac8.sma(41) : error 088: number of arguments does not match definition

2 Errors.
Could not locate output file 9f569eca19007f5f62020b5fdb369ac8.amx (compile failed).
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests