←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

[ROZWIĄZANE] Jak zarejestrować ten plugin?


Najlepsza odpowiedź Engi 22.08.2013 09:47

A no tak, bo trzeba dodać public :D

 
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent("rozbraja", 3, "2=Planted_The_Bomb");
	
}

public rozbraja(id)
{
	new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
	if(is_valid_ent(bomb)){
		if(cs_get_c4_defusing(bomb))
		{
			client_print(id , print_center, "%s rozbraja bombe")
		}
		else
		{
			client_print(id, print_center, "%s przerwal rozbrajanie bomby")
		}
	}
}
Przejdź do postu
Zablokowany

  • +
  • -
Predator ;* - zdjęcie Predator ;* 22.08.2013

Siema . Jak zarejestrować ten plugin . Tzn w rejestracji jak go zarejestrować . ?

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
}
new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		/client_print(id, print_center, "%s przerwalw rozbrajanie bomby")
	}
}

Odpowiedz

  • +
  • -
DarkGL - zdjęcie DarkGL 22.08.2013

Siema . Jak zarejestrować ten plugin . Tzn w rejestracji jak go zarejestrować . ?

 

:huh:

Trochę jaśniej proszę

Odpowiedz

  • +
  • -
Predator ;* - zdjęcie Predator ;* 22.08.2013

Mamy to

new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		/client_print(id, print_center, "%s przerwal rozbrajanie bomby")

}

}

i w register_ co wpisać aby to new bomb było zarejestrowane?

 

 

// Sorry dopiero się uczę .

 

 


Użytkownik Predator ;* edytował ten post 22.08.2013 09:13
Odpowiedz

  • +
  • -
MAGNET - zdjęcie MAGNET 22.08.2013

po 1. nie dodales biblioteki cstrike :)

Odpowiedz

  • +
  • -
Engi - zdjęcie Engi 22.08.2013

Dodaj moduły

#include <cstrike>
#include <engine>

usuń "/" sprzed "client_print"
i skompiluj plugin
Odpowiedz

  • +
  • -
Predator ;* - zdjęcie Predator ;* 22.08.2013

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


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


new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		client_print(id, print_center, "%s przerwal rozbrajanie bomby")
	}
}


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid function or declaration on line 20
Error: Invalid function or declaration on line 21
Error: Invalid function or declaration on line 25
Warning: Symbol is never used: "bomb" on line 31

3 Errors.
Could not locate output file C:\Documents and Settings\Wojtek\Moje dokumenty\AMX Studio\test.amx (compile failed).
 


Użytkownik Predator ;* edytował ten post 22.08.2013 09:24
Odpowiedz

  • +
  • -
Engi - zdjęcie Engi 22.08.2013

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


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


new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		/client_print(id, print_center, "%s przerwal rozbrajanie bomby")
	}
}
}

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid function or declaration on line 19
Error: Invalid function or declaration on line 20
Error: Invalid function or declaration on line 24
Warning: Symbol is never used: "bomb" on line 30

3 Errors.
Could not locate output file C:\Documents and Settings\Wojtek\Moje dokumenty\AMX Studio\test.amx (compile failed).



Ktoś tu zapomniał o module engine
Odpowiedz

  • +
  • -
Predator ;* - zdjęcie Predator ;* 22.08.2013

 

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


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


new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		/client_print(id, print_center, "%s przerwal rozbrajanie bomby")
	}
}
}

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid function or declaration on line 19
Error: Invalid function or declaration on line 20
Error: Invalid function or declaration on line 24
Warning: Symbol is never used: "bomb" on line 30

3 Errors.
Could not locate output file C:\Documents and Settings\Wojtek\Moje dokumenty\AMX Studio\test.amx (compile failed).

 



Ktoś tu zapomniał o module engine

 

Poprawione sprawdź mój post wyżej .

Odpowiedz

  • +
  • -
d0naciak - zdjęcie d0naciak 22.08.2013

 

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


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


new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
if(is_valid_ent(bomb)){
	if(cs_get_c4_defusing(bomb))
	{
		client_print(id , print_center, "%s rozbraja bombe")
	}
	else
	{
		/client_print(id, print_center, "%s przerwal rozbrajanie bomby")
	}
}
}

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Invalid function or declaration on line 19
Error: Invalid function or declaration on line 20
Error: Invalid function or declaration on line 24
Warning: Symbol is never used: "bomb" on line 30

3 Errors.
Could not locate output file C:\Documents and Settings\Wojtek\Moje dokumenty\AMX Studio\test.amx (compile failed).

 



Ktoś tu zapomniał o module engine

 

:mur: :mur: :mur:

 

Polecam użyć modułu csx oraz pokombinować z wychwyceniem komendy +use

A także poczytać parę poradników znajdujących się w dziale Tutoriale

Odpowiedz

  • +
  • -
Najlepsza odpowiedź Engi - zdjęcie Engi 22.08.2013

A no tak, bo trzeba dodać public :D

 
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_logevent("rozbraja", 3, "2=Planted_The_Bomb");
	
}

public rozbraja(id)
{
	new bomb  = find_ent_by_model(-1, "grenade", "models/w_c4.mdl")
	if(is_valid_ent(bomb)){
		if(cs_get_c4_defusing(bomb))
		{
			client_print(id , print_center, "%s rozbraja bombe")
		}
		else
		{
			client_print(id, print_center, "%s przerwal rozbrajanie bomby")
		}
	}
}
Odpowiedz

  • +
  • -
Droso - zdjęcie Droso 22.08.2013

        register_event("SendAudio", "BombaRozbrojona", "a", "2&%!MRAD_BOMBDEF");
	register_event("BarTime", "RozbrajaBombe", "be", "1=10", "1=5");

Brak funkcji dla tych eventów.


Użytkownik HubertTM edytował ten post 22.08.2013 09:50
Odpowiedz

  • +
  • -
BlackPerfum - zdjęcie BlackPerfum 22.08.2013

Pamiętajmy że pisanie w pawnie to nie tylko Ctrl+c i Ctrl+v bo tak się do niczego nie dojdzie (bynajmniej nie prędko). Jak już kopiujesz kod z jakiegoś miejsca to musisz pomyśleć gdzie go użyć. Mamy tu żywy przykład jeśli kopiujesz już z dokumentacji to zanim skopiujesz pomyśl w jakim miejscu możesz go użyć aby działał :D

 

 

Jak zarejestrować ten plugin

register_plugin(PLUGIN, VERSION, AUTHOR)

Plugin zarejestrowany poprawnie :D

 

 

 

i w register_ co wpisać aby to new bomb było zarejestrowane?

Najlepiej poczytać w dokumentacji o ciekawych eventach :D

 

Osobiście polecił bym zarejestrowanie thinka c4  poprzez hamsandwich`a (jeśli chcemy wychwycić moment rozpoczęcia i zakończenia rozbrajania bez względu czy przestaniemy rozbrajać w połowie czy też rozbroimy naszą paczuszkę)

 

 

 

Polecam użyć modułu csx oraz pokombinować z wychwyceniem komendy +use
A także poczytać parę poradników znajdujących się w dziale Tutoriale

Ani wychwycenie komendy +use ani moduł csx nie oferuje wychwycenia momentu zakończenia rozbrajania (bez względu czy przestaniemy rozbrajać w połowie czy też rozbroimy naszą paczuszkę :D)

 

 

 

Odpowiedz

Fail - zdjęcie Fail 22.08.2013

http://amxx.pl/index...ection=register

 

dajesz nazwe pluginu, haslo do pluginu i email pluginu i mozesz go rejestrowac do woli az do sktuku. -- nazywaj tematy zgodnie z problemem to sie nauczysz...

Odpowiedz
Zablokowany