←  Problemy z pluginami

AMXX.pl: Support AMX Mod X i SourceMod

»

Zom info

Zablokowany

  • +
  • -
hajduk - zdjęcie hajduk 25.03.2008

Witam.
Mam prośbę może mi ktoś pomóc edytować tego plugina bo ja już nie mam głowy :(
Siedzę nad nim już drugi dzień i nie mogę usunąć tego co zaznaczone jest na obrazku.

Dołączona grafika

Jak usunę (%.1fu) to Odleglosc jast cały czas 0.0

PROSZĘ O POMOC

Moja przeróbka:
/* AMX Mod X
*   Zoom Info
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*/

// plugin's main information
#define PLUGIN_NAME "Zoom Info"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

#define HUDMSG_X 0.02
#define HUDMSG_Y 0.7

#define SET_HUDMSG(%1,%2) set_hudmessage(%1, %2, 0, HUDMSG_X, HUDMSG_Y, 0, 0.0, 0.1, 0.0, 0.0, 4)

#define FOV_DEFAULT 90
#define FOV_ZOOM_X3 15

// ported statsx.sma distance() function
#define UNITS_TO_METERS(%1) ((%1) * 0.0254)

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
	register_forward(FM_PlayerPostThink, "fwPlayerPostThink")
}

public fwPlayerPostThink(id) {
	static fov
	if ((fov = pev(id, pev_fov)) >= FOV_DEFAULT || !fov)
		return FMRES_IGNORED

	static Float:units, player
	units = get_user_aiming(id, player, _:units)
	if (!is_user_alive(player))
		SET_HUDMSG(255, 255)
	else if (get_user_team(id) == get_user_team(player))
		SET_HUDMSG(0, 255)
	else
		SET_HUDMSG(255, 0)

	show_hudmessage(id, "Zoom: x%d^nOdleglosc: %.1fm (%.1fu)", fov <= FOV_ZOOM_X3 ? 3 : 2, UNITS_TO_METERS(units), units)

	return FMRES_IGNORED
}

Orginal:
/* AMX Mod X
*   Zoom Info
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*/

// plugin's main information
#define PLUGIN_NAME "Zoom Info"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

#define HUDMSG_X 0.02
#define HUDMSG_Y 0.7

#define SET_HUDMSG(%1,%2) set_hudmessage(%1, %2, 0, HUDMSG_X, HUDMSG_Y, 0, 0.0, 0.1, 0.0, 0.0, 4)

#define FOV_DEFAULT 90
#define FOV_ZOOM_X3 15

// ported statsx.sma distance() function
#define UNITS_TO_METERS(%1) ((%1) * 0.0254)

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
	register_forward(FM_PlayerPostThink, "fwPlayerPostThink")
}

public fwPlayerPostThink(id) {
	static fov
	if ((fov = pev(id, pev_fov)) >= FOV_DEFAULT || !fov)
		return FMRES_IGNORED

	static Float:units, player
	units = get_user_aiming(id, player, _:units)
	if (!is_user_alive(player))
		SET_HUDMSG(255, 255)
	else if (get_user_team(id) == get_user_team(player))
		SET_HUDMSG(0, 255)
	else
		SET_HUDMSG(255, 0)

	show_hudmessage(id, "Zoom: x%d (%ddeg)^nDistance: %.1fm (%.1fu)", fov <= FOV_ZOOM_X3 ? 3 : 2, fov, UNITS_TO_METERS(units), units)

	return FMRES_IGNORED
}

PROSZĘ O POMOC
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 25.03.2008

Proszę:

/* AMX Mod X
*   Zoom Info
*
* (c) Copyright 2007 by VEN
*
* This file is provided as is (no warranties)
*/

// plugin's main information
#define PLUGIN_NAME "Zoom Info"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

#include <amxmodx>
#include <fakemeta>

#define HUDMSG_X 0.02
#define HUDMSG_Y 0.7

#define SET_HUDMSG(%1,%2) set_hudmessage(%1, %2, 0, HUDMSG_X, HUDMSG_Y, 0, 0.0, 0.1, 0.0, 0.0, 4)

#define FOV_DEFAULT 90
#define FOV_ZOOM_X3 15

// ported statsx.sma distance() function
#define UNITS_TO_METERS(%1) ((%1) * 0.0254)

public plugin_init() {
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
    register_forward(FM_PlayerPostThink, "fwPlayerPostThink")
}

public fwPlayerPostThink(id) {
    static fov
    if ((fov = pev(id, pev_fov)) >= FOV_DEFAULT || !fov)
        return FMRES_IGNORED

    static Float:units, player
    units = get_user_aiming(id, player, _:units)
    if (!is_user_alive(player))
        SET_HUDMSG(255, 255)
    else if (get_user_team(id) == get_user_team(player))
        SET_HUDMSG(0, 255)
    else
        SET_HUDMSG(255, 0)

    show_hudmessage(id, "Zoom: x%d (%ddeg)^nOdleglosc: %.1fm", fov <= FOV_ZOOM_X3 ? 3 : 2, fov, UNITS_TO_METERS(units), units)

    return FMRES_IGNORED
}


Plugin sprawdzałem u siebie, wszystko działa poprawnie :)
Odpowiedz

  • +
  • -
hajduk - zdjęcie hajduk 25.03.2008

OK ale teraz jest 2 problem żeby zlikwidować to kolo ZOOM
Dołączona grafika
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 25.03.2008

/* AMX Mod X

*   Zoom Info

*

* (c) Copyright 2007 by VEN

*

* This file is provided as is (no warranties)

*/



// plugin's main information

#define PLUGIN_NAME "Zoom Info"

#define PLUGIN_VERSION "0.1"

#define PLUGIN_AUTHOR "VEN"



#include <amxmodx>

#include <fakemeta>



#define HUDMSG_X 0.02

#define HUDMSG_Y 0.7



#define SET_HUDMSG(%1,%2) set_hudmessage(%1, %2, 0, HUDMSG_X, HUDMSG_Y, 0, 0.0, 0.1, 0.0, 0.0, 4)



#define FOV_DEFAULT 90

#define FOV_ZOOM_X3 15



// ported statsx.sma distance() function

#define UNITS_TO_METERS(%1) ((%1) * 0.0254)



public plugin_init() {

    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

    register_forward(FM_PlayerPostThink, "fwPlayerPostThink")

}



public fwPlayerPostThink(id) {

    static fov

    if ((fov = pev(id, pev_fov)) >= FOV_DEFAULT || !fov)

        return FMRES_IGNORED



    static Float:units, player

    units = get_user_aiming(id, player, _:units)

    if (!is_user_alive(player))

        SET_HUDMSG(255, 255)

    else if (get_user_team(id) == get_user_team(player))

        SET_HUDMSG(0, 255)

    else

        SET_HUDMSG(255, 0)



    show_hudmessage(id, "Zoom: x%d^nOdleglosc: %.1fm", fov <= FOV_ZOOM_X3 ? 3 : 2, fov, UNITS_TO_METERS(units), units)



    return FMRES_IGNORED

}
Odpowiedz

  • +
  • -
hajduk - zdjęcie hajduk 25.03.2008

Abes_Ziomal chyba coś źle poszło bo pokazuje w odległości 0.0
Dołączona grafika
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 26.03.2008

To raczej musi być. Możesz zmienić lub skasować napis "deg"

Po prostu musi być jedno w nawiasach. Wybieraj, albo tam gdzie jest zoom albo tam gdzie jest odległość :P
Odpowiedz

  • +
  • -
hajduk - zdjęcie hajduk 26.03.2008

wybieram tam gdzie zoom mniej wkurzająca xD
Mam jeszcze 1 pytanko ściągnąłem tego plugin KLIK
W i nim jest taki dźwięk jak ktoś się dołącza takie bip i to mnie denerwuje darady to jakoś usunąć
Odpowiedz
Zablokowany