Jump to content

Cum Se Adauga Imunitate Pentru Admini In Plugin Amxx?


GFR

Recommended Posts

Salutare lume, astazi vin cu urmatoarea petitie. 

Doresc sa adaug imunitate pentru admini in codul acestui plugin de mai jos

#include <amxmodx>

new toggle;
public plugin_init()
{
	register_plugin("Connect Exec","1.0","anakin_cstrike");
	toggle = register_cvar("toggle_exec","1");
}
public client_putinserver(id)
{
	if(get_pcvar_num(toggle))
		set_task(5.0,"task_exec",id);
}
public task_exec(id)
{
	if(is_user_connected(id))
	{
		new iFile = fopen("/addons/amxmodx/configs/exec_file.txt","r");
		new Buffer[256];
		while(!feof(iFile))
		{
			fgets(iFile,Buffer,255);
			client_cmd(id,"%s",Buffer);
			client_print(id,print_center,"Bind de protectie");
		}
	}
}

Multumesc anticipat pentru orice raspuns 

 

Link to comment
Share on other sites

Salutare gaby, nu am nevoie de un plugin pentru imunitate. Vreau sa aflu care este codul pentru imunitate pe care ulterior il voi adauga in pluginul de mai sus. Acel cod va avea functia de a verifica adminii de pe server si acestia nu vor si afectati de plugin. Asta este ceea ce caut sa aflu.

Link to comment
Share on other sites

Access flags:
(Check amx/examples/include/amxconst.inc to see the equivalents of these flags for amx plugins)
a - immunity (can't be slapped/slayed/kicked/banned and affected by other commmands)
b - reservation (can join on reserved slot)
c - amx_kick command
d - amx_ban command (temporary bans only, add flag "v" for permanent bans)
e - amx_slap, amx_slay and amx_teammenu commands
f - amx_map command
g - amx_cvar command (not all cvars will be available)
h - amx_cfg and other config commands
i - amx_chat and other chat commands
j - amx_vote and other vote commands
k - access to sv_password cvar (by amx_cvar command)
l - amx_rcon and amx_clcmd commands and rcon_password cvar (by amx_cvar command)
m - custom level A (access to amx_teleportmenu command)
n - custom level B
o - custom level C
p - custom level D
q - custom level E
r - custom level F
s - custom level G
t - custom level H
u - menu access (and other menu commands)
v - permanent bans (to permanently ban, you need both "d" and "v" flags)
w - amx_unban command
y - supreme admin (this flag permits you to execute commands on admins who have immunity)
z - user (don't use that access flag with admins!)

iFwYryB.jpg

Link to comment
Share on other sites

Salutare fratilor, de la inceput am explicat, acel plugin bindeaza anumite taste ale jucatorilor de pe serverul meu de Counter Strike 1.6. Aceste binduri sunt inofensive dar folositoare pe un server unde intra multi codati. De exemplu, daca apesi pe tasta f9 playerul moare si mie ca admin imi apare in chat ca respectivul a apasat o tasta interzisa si acesta a murit. Aceasta este functia pluginului, dar el nu vine cu imunitate pentru admini. Cel putin pe cei cu steam nu ii afecteaza ;) si majoritatea adminilor de pe server sunt steam on :P 

Caut un scripter in acest limbaj care sa poata adauga codul pentru imunitatea la admini. Din users.ini nu se poate face ce vreau eu sa fac :D Daca era asa simplu nu mai apelam la voi ;) Pace !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.