Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

[ROZWIĄZANE] Aby tylko admini z immunitetem mogli używać pluginu

modyfikacja

  • Zamknięty Temat jest zamknięty
4 odpowiedzi w tym temacie

#1 Sidenek

    Banned

  • Zbanowany

Reputacja: 2
Nowy

  • Postów:96
  • GG:
  • Imię:Kamil
  • Lokalizacja:Gliwice
Offline

Napisano 26.03.2013 10:18

Witam. Chodzi o szybką przeróbkę, aby tylko admini z flagą "a" (immunitetem) mogli używać tych komend:

amx_godmode
amx_noclip

Oto sma pluginu:


/***********

cheat - allows you to enable noclip and godmode on players

Commands:
amx_noclip <target> - allows you to set noclip on the target client
amx_godmode <target> - allows you to set godmode on the target client
repeat the command to disable

default access is ADMIN_BAN, so basically anyone with access to amx_ban will beable to use these commands

How to install:
- Find your plugins.ini in your config folder (addons/amxmodx/configs/plugins.ini) open it in notepad and type cheat.amxx
- Place the cheat.amxx in your plugins folder (addons/amxmodx/plugins/)

Requires the fun module
- Find your modules.ini (addons/amxmodx/configs/modules.ini) open it in notepad and
- Uncomment (remove the ; from infront of) the fun_amxx.dll or the fun_amxx_i386.so if you are using linux

watch <<img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' />~?

***********/

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
register_plugin("amx_cheat","1.0","watch")
register_concmd("amx_godmode","amx_godmode",ADMIN_BAN,"<target>")
register_concmd("amx_noclip","amx_noclip",ADMIN_BAN,"<target>")
}

public amx_godmode(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_godmode(player)) {
set_user_godmode(player,1)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: enabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: enabled godmode on %s",target_name)
}
} else {
set_user_godmode(player)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled godmode on %s",target_name)
}
}
return PLUGIN_HANDLED
}

public amx_noclip(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_noclip(player)) {
set_user_noclip(player,1)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: enabled noclip on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: enabled noclip on %s",target_name)
}
} else {
set_user_noclip(player)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled noclip on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled noclip on %s",target_name)
}
}
return PLUGIN_HANDLED
}

Będzie plusik! Chciałbym też wiedzieć która linijka lub co zostało zmienione, dla własnej wiadomości :) Z góry dzięki.

Użytkownik Sidenek edytował ten post 26.03.2013 10:18

Dołączona grafika


"Prawda jest autorytetem, a nie autorytet prawdą." ~ Metrowy


#2 luki3507

    Zaawansowany

  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:120
  • Lokalizacja:częstochowa
Offline

Napisano 26.03.2013 10:23

/***********

cheat - allows you to enable noclip and godmode on players

Commands:
amx_noclip <target> - allows you to set noclip on the target client
amx_godmode <target> - allows you to set godmode on the target client
repeat the command to disable

default access is ADMIN_BAN, so basically anyone with access to amx_ban will beable to use these commands

How to install:
- Find your plugins.ini in your config folder (addons/amxmodx/configs/plugins.ini) open it in notepad and type cheat.amxx
- Place the cheat.amxx in your plugins folder (addons/amxmodx/plugins/)

Requires the fun module
- Find your modules.ini (addons/amxmodx/configs/modules.ini) open it in notepad and
- Uncomment (remove the ; from infront of) the fun_amxx.dll or the fun_amxx_i386.so if you are using linux

watch <:D~?

***********/

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
register_plugin("amx_cheat","1.0","watch")

register_concmd("amx_godmode","amx_godmode",ADMIN_IMMUNITY,"<target>")
register_concmd("amx_noclip","amx_noclip",ADMIN_IMMUNITY,"<target>")
}

public amx_godmode(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_godmode(player)) {
set_user_godmode(player,1)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: enabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: enabled godmode on %s",target_name)
}
} else {
set_user_godmode(player)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled godmode on %s",target_name)
}
}
return PLUGIN_HANDLED
}

public amx_noclip(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_noclip(player)) {
set_user_noclip(player,1)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: enabled noclip on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: enabled noclip on %s",target_name)
}
} else {
set_user_noclip(player)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: disabled noclip on %s",admin_name,target_name)
case 1: client_print(0,print_chat,"ADMIN: disabled noclip on %s",target_name)
}
}
return PLUGIN_HANDLED
}

zmienione linijki
register_concmd("amx_godmode","amx_godmode",ADMIN_IMMUNITY,"<target>")
register_concmd("amx_noclip","amx_noclip",ADMIN_IMMUNITY,"<target>")

Użytkownik luki3507 edytował ten post 26.03.2013 10:27

  • +
  • -
  • 0

#3 Sidenek

    Banned

  • Autor tematu
  • Zbanowany

Reputacja: 2
Nowy

  • Postów:96
  • GG:
  • Imię:Kamil
  • Lokalizacja:Gliwice
Offline

Napisano 26.03.2013 12:10

Niestety ale to nie działa - zwykli admini nadal mogą używać tej komendy.

@ odświeżam

Użytkownik Sidenek edytował ten post 26.03.2013 12:10

Dołączona grafika


"Prawda jest autorytetem, a nie autorytet prawdą." ~ Metrowy


#4 Oddaj Wiertarke

    Profesjonalista

  • Użytkownik

Reputacja: 74
Pomocny

  • Postów:164
  • Imię:Matico
  • Lokalizacja:Wieś
Offline

Napisano 26.03.2013 15:54

Łap działa testowałem.
/***********
cheat - allows you to enable noclip and godmode on players
Commands:
amx_noclip <target> - allows you to set noclip on the target client
amx_godmode <target> - allows you to set godmode on the target client
repeat the command to disable
default access is ADMIN_BAN, so basically anyone with access to amx_ban will beable to use these commands
How to install:
- Find your plugins.ini in your config folder (addons/amxmodx/configs/plugins.ini) open it in notepad and type cheat.amxx
- Place the cheat.amxx in your plugins folder (addons/amxmodx/plugins/)
Requires the fun module
- Find your modules.ini (addons/amxmodx/configs/modules.ini) open it in notepad and
- Uncomment (remove the ; from infront of) the fun_amxx.dll or the fun_amxx_i386.so if you are using linux
watch <<img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' />~?
***********/
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init() {
register_plugin("amx_cheat","1.0","watch")

register_concmd("amx_godmode","amx_godmode",ADMIN_IMMUNITY,"<target>")
register_concmd("amx_noclip","amx_noclip",ADMIN_IMMUNITY,"<target>")
}
public amx_godmode(id,level,cid) {
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
  return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_godmode(player)) {
  set_user_godmode(player,1)
  switch(get_cvar_num("amx_show_activity")) {
   case 2: client_print(0,print_chat,"ADMIN %s: enabled godmode on %s",admin_name,target_name)
    case 1: client_print(0,print_chat,"ADMIN: enabled godmode on %s",target_name)
   }
  } else {
  set_user_godmode(player)
  switch(get_cvar_num("amx_show_activity")) {
   case 2: client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
    case 1: client_print(0,print_chat,"ADMIN: disabled godmode on %s",target_name)
   }
}
return PLUGIN_HANDLED
}
public amx_noclip(id,level,cid) {
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
  return PLUGIN_HANDLED

new arg[32], admin_name[32], target_name[32]
read_argv(1,arg,31)

new player = cmd_target(id,arg,14)
if (!player) return PLUGIN_HANDLED

get_user_name(id,admin_name,31)
get_user_name(player,target_name,31)

if (!get_user_noclip(player)) {
  set_user_noclip(player,1)
  switch(get_cvar_num("amx_show_activity")) {
   case 2: client_print(0,print_chat,"ADMIN %s: enabled noclip on %s",admin_name,target_name)
    case 1: client_print(0,print_chat,"ADMIN: enabled noclip on %s",target_name)
   }
  } else {
  set_user_noclip(player)
  switch(get_cvar_num("amx_show_activity")) {
   case 2: client_print(0,print_chat,"ADMIN %s: disabled noclip on %s",admin_name,target_name)
    case 1: client_print(0,print_chat,"ADMIN: disabled noclip on %s",target_name)
   }
}
return PLUGIN_HANDLED
}

  • +
  • -
  • 0

#5 Gość_21977_*

  • Gość

Reputacja: 0

Offline

Napisano 26.03.2013 18:01

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL





Również z jednym lub większą ilością słów kluczowych: modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych