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
 

KmP'eR - zdjęcie

KmP'eR

Rejestracja: 03.01.2010
Aktualnie: Nieaktywny
Poza forum Ostatnio: 13.01.2014 19:45
-----

#103724 Mała przeróbka pluginu

Napisane przez KmP'eR w 04.01.2010 22:28

Łap:
Po wpisaniu /admin pojawi się napis taki jak chciałeś(tylko dla gracza który wpisał komendę /admin)
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Admin"
#define VERSION "0.1"
#define AUTHOR "KmP'eR"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd( say /admin , pokaz_admin)
}
public pokaz_admin(id){
	client_print(id, print_chat, "Lista adminów dostępna na www")
        return PLUGIN_CONTINUE;
}

Po wpisaniu /admin tekst zobaczą wszyscy.
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Admin"
#define VERSION "0.1"
#define AUTHOR "KmP'eR"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd( say /admin , pokaz_admin)
}
public pokaz_admin(){
	client_print(0, print_chat, "Lista adminów dostępna na www")
        return PLUGIN_CONTINUE;
}
Jak coś źle to pisz!
  • +
  • -
  • 1


#103656 steam id przy wejściu na serwer

Napisane przez KmP'eR w 04.01.2010 18:55

Łap jeśli coś nie działa to pisz bo dopiero zaczynam w pisaniu pluginów, tak na szybko pisałem :D
Oto .sma:
#include <amxmodx>
#include <amxmisc>
#include <GeoIP>

#define PLUGIN "Info O Graczu"
#define VERSION "1.0"
#define AUTHOR "KmP'eR"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id){
	new userIP [16];
	get_user_ip (id, userIP, 15)
	new userName [32];
	get_user_name(id, userName, 31)
	new userID [35];
	get_user_authid (id, userID, 34)
	new userCountry [46];
	geoip_country(userIP, userCountry, 45)
	set_hudmessage(255, 127, 0, 0.03, 0.78, 0, 6.0, 8.0)
	show_hudmessage(0, "%s (%s) polaczony (%s), userName, userID, userCountry")
}

public client_disconnect(id){
	new userIP [16];
	get_user_ip (id, userIP, 15)
	new userName [32];
	get_user_name(id, userName, 31)
	new userID [35];
	get_user_authid (id, userID, 34)
	new userCountry [46];
	geoip_country(userIP, userCountry, 45)
	set_hudmessage(255, 127, 0, 0.03, 0.78, 0, 6.0, 8.0)
	show_hudmessage(0, "%s (%s) rozlaczony (%s), userName, userID, userCountry")
}

Załączone pliki


  • +
  • -
  • 1


#103628 Plugin FreeWeapon

Napisane przez KmP'eR w 04.01.2010 18:12

A macie jakąś dobrą WWW z tutami jak robić pluginy?
  • +
  • -
  • 1


#103556 Plugin FreeWeapon

Napisane przez KmP'eR w 03.01.2010 22:55

OK Zmieniłem
A tak to jak fajny jak na pierwszy plugin :?: :wstyd:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "AdminFreeWeapon"
#define VERSION "0.2"
#define AUTHOR "KmP'eR"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR);
        register_clcmd ("say free","free_weapon")
        register_clcmd ("say /free","free_weapon")
}
public free_weapon(id){ 
        if(access(id,ADMIN_LEVEL_C)){ 
                give_item (id,"weapon_mp5navy")
                give_item (id,"ammo_9mm " )
                give_item (id,"ammo_9mm " )
                give_item (id,"ammo_9mm " )
                give_item (id,"weapon_deagle")
                give_item (id,"ammo_50ae")
                give_item (id,"ammo_50ae")
                give_item (id,"ammo_50ae")
                give_item (id,"ammo_50ae")
                give_item (id,"weapon_flashbang")
                give_item (id,"weapon_flashbang")
                give_item (id,"weapon_smokegrenade")
                give_item (id,"weapon_hegrenade")
                set_hudmessage(255, 255, 255, 0.02, 0.71, 0, 6.0, 5.0)
                show_hudmessage(id, "Dostales: MP5 DGL HE FB SG")       
         }
        else{
                new szName [32];
                get_user_name(id, szName, 31)
                set_hudmessage(42, 42, 255, 0.02, 0.71, 0, 6.0, 5.0)
                show_hudmessage(id, "%s tylko dla admina!!", szName)
        
        }
}

  • +
  • -
  • 1


#103549 Plugin FreeWeapon

Napisane przez KmP'eR w 03.01.2010 22:45

Czyli np:

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

#define PLUGIN "AdminFreeWeapon"
#define VERSION "0.2"
#define AUTHOR "KmP'eR"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd ("free","free_weapon")
}
public free_weapon(id){
if(access(id,ADMIN_LEVEL_C)){
give_item (id,"weapon_mp5navy")
give_item (id,"ammo_9mm " )
give_item (id,"weapon_deagle")
give_item (id,"ammo_50ae")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_smokegrenade")
give_item (id,"weapon_hegrenade")
set_hudmessage(255, 255, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "Dostales: MP5 DGL HE FB SG")
}
else{
new szName [32];
get_user_name(id, szName, 31)
set_hudmessage(42, 42, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "%s tylko dla admina!!", szName)

}
}

  • +
  • -
  • 1


#103545 Plugin FreeWeapon

Napisane przez KmP'eR w 03.01.2010 22:38

Czyli jak dać ammo bo jestem w tym zielony.
  • +
  • -
  • 1


#103542 Plugin FreeWeapon

Napisane przez KmP'eR w 03.01.2010 22:29

Jak to przecież dostaje full ammo. testowałem
  • +
  • -
  • 1


#103536 Plugin FreeWeapon

Napisane przez KmP'eR w 03.01.2010 22:13

Jest to plugin który zrobiłem z nudów i by się czegoś nauczyć:D
Jest to banalny plugin a mianowicie.
Gdy admin wpisze free dostaje MP5 DGL HE FB SG
a jeśli wpisze go gracz pisze np: KmP'eR tylko dla admina!!

Instalacja:
Standardowa
Oto .sma:

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

#define PLUGIN "AdminFreeWeapon"
#define VERSION "0.2"
#define AUTHOR "KmP'eR"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd ("free","free_weapon")
}
public free_weapon(id){
if(access(id,ADMIN_LEVEL_C)){
give_item (id,"weapon_mp5navy")
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_smokegrenade")
give_item (id,"weapon_hegrenade")
set_hudmessage(255, 255, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "Dostales: MP5 DGL HE FB SG")
}
else{
new szName [32];
get_user_name(id, szName, 31)
set_hudmessage(42, 42, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "%s tylko dla admina!!", szName)

}
}

Załączone pliki


  • +
  • -
  • 1