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

[SOLVED] call_of_duty_aim plugin


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

#1 totoff

    Zaawansowany

  • Użytkownik

Reputacja: 1
Nowy

  • Postów:122
  • Imię:christophe
  • Lokalizacja:france
Offline

Napisano 16.05.2011 19:23

Hello,

I would like to remove the message and force crossair to 1
menu = menu_create("\rCall of Duty\y Aim^n\wChoose an option:", "action_menu");
menu_additem(menu, "\wChoose this option if you agree to have^nyour crosshair changed", "1");
menu_additem(menu, "\wChoose this option if you don't agree to have^nyour crosshair changed", "2");


It's possible please?


// *************************************************************
// * #### #### #### #### ## ## ######## ## ## *
// * ## ## ## ## ## ## ## ## ## ## ## ## ## *
// * ## ### ## ## ### ## ## ## ####### *
// * ## ## ## ## ## ## ## ## *
// * ## ## ## ## ## ## ## ## *
// *************************************************************
//
// [My Steamid: [url=http://steamcommunity.com/id/mmyth]]Steam Community :: Error[/url]

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Call of Duty Aim"
#define VERSION "1.4"
#define AUTHOR "MMYTH"

#pragma semicolon 1

#define MAX_SIZE_ID 33

new is_friend[MAX_SIZE_ID], is_accept[MAX_SIZE_ID];

new g_hit, SyncHudMsg, menu;

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

g_hit = register_cvar("cod_aim_showhit", "1"); // drekes idea ;D

register_clcmd("say /cod_aim", "clcmd_cod_aim");

register_event("Damage", "event_damage", "b", "2!0", "3=0", "4!0");
register_event("StatusValue", "event_statusvalue_team", "be", "1=1");
register_event("StatusValue", "event_status_value", "be", "1=2", "2!0");
register_event("StatusValue", "event_statusvalue_hide", "be", "1=1", "2=0");

menu = menu_create("\rCall of Duty\y Aim^n\wChoose an option:", "action_menu");
menu_additem(menu, "\wChoose this option if you agree to have^nyour crosshair changed", "1");
menu_additem(menu, "\wChoose this option if you don't agree to have^nyour crosshair changed", "2");
menu_setprop(menu, MPROP_NUMBER_COLOR, "\y");
menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER);

SyncHudMsg = CreateHudSyncObj();
}

public client_putinserver(id)
{
set_task(10.0, "task_showmenu", id);

is_accept[id] = 0;
}

public task_showmenu(id)
{
if(is_user_connected(id))
{
menu_display(id, menu);
}
}

public clcmd_cod_aim(id)
{
is_accept[id] ? (is_accept[id] = 0) : (is_accept[id] = 1);
client_print(id, print_chat, "[Call of Duty Aim] Personal %sctivation.", is_accept[id] ? "A" : "Dea");
CallofDutyAim(id, "250 250 50");
}

public action_menu(id, menu, item)
{
if(item == 0)
{
is_accept[id] = 1;

CallofDutyAim(id, "250 250 50");
}

client_print(id, print_chat, "[Call of Duty Aim] If you want to change your option, say ^"/cod_aim^".");

menu_cancel(id);
return PLUGIN_CONTINUE;
}

public event_damage(id)
{
new attacker = get_user_attacker(id);

if(get_pcvar_num(g_hit) && is_accept[attacker])
{
set_hudmessage(170, 255, 255, -1.0, -1.0, 0, 2.0, 3.0);
ShowSyncHudMsg(attacker, SyncHudMsg, "X");
}
}

public event_statusvalue_team(id)
{
if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
{
is_friend[id] = read_data(2);
}
}

public event_status_value(id)
{
if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
{
if(is_friend[id] == 1)
{
CallofDutyAim(id, "50 250 50");
}
else
{
CallofDutyAim(id, "255 0 0");
}
}
}

public event_statusvalue_hide(id)
{
if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
{
CallofDutyAim(id, "250 250 50");
}
}

CallofDutyAim(id, color[])
{
client_cmd(id, "cl_crosshair_color ^"%s^"", color);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/

  • +
  • -
  • 0

#2 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 554
Godlike

  • Postów:11 979
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 18.05.2011 13:56

delete menu yes ? player always have crosshair yes ?
  • +
  • -
  • 0

#3 totoff

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:122
  • Imię:christophe
  • Lokalizacja:france
Offline

Napisano 18.05.2011 19:20

yes dealate for menu and player always have crosshair X
  • +
  • -
  • 0

#4 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 554
Godlike

  • Postów:11 979
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 18.05.2011 21:58


#include <amxmodx>

#include <amxmisc>



#define PLUGIN          "Call of Duty Aim"

#define VERSION         "1.4"

#define AUTHOR          "MMYTH"



#pragma semicolon 1



#define MAX_SIZE_ID     33



new is_friend[MAX_SIZE_ID], is_accept[MAX_SIZE_ID];



new g_hit, SyncHudMsg;



public plugin_init()

{

	register_plugin(PLUGIN, VERSION, AUTHOR);

	

	g_hit = register_cvar("cod_aim_showhit", "1"); // drekes idea ;D

	

	register_clcmd("say /cod_aim", "clcmd_cod_aim");

	

	register_event("Damage", "event_damage", "b", "2!0", "3=0", "4!0");

	register_event("StatusValue", "event_statusvalue_team", "be", "1=1");

	register_event("StatusValue", "event_status_value", "be", "1=2", "2!0");

	register_event("StatusValue", "event_statusvalue_hide", "be", "1=1", "2=0");

	

	SyncHudMsg = CreateHudSyncObj();

}



public client_putinserver(id)

{

	is_accept[id] = 1;

	CallofDutyAim(id, "250 250 50");

}



public clcmd_cod_aim(id)

{

	is_accept[id] ? (is_accept[id] = 0) : (is_accept[id] = 1);

	client_print(id, print_chat, "[Call of Duty Aim] Personal %sctivation.", is_accept[id] ? "A" : "Dea");

	CallofDutyAim(id, "250 250 50");

}



public event_damage(id)

{

	new attacker = get_user_attacker(id);

	

	if(get_pcvar_num(g_hit) && is_accept[attacker])

	{

		set_hudmessage(170, 255, 255, -1.0, -1.0, 0, 2.0, 3.0);

		ShowSyncHudMsg(attacker, SyncHudMsg, "X");

	}

}



public event_statusvalue_team(id)

{

	if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])

	{

		is_friend[id] = read_data(2);

	}

}



public event_status_value(id)

{

	if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])

	{

		if(is_friend[id] == 1)

		{

			CallofDutyAim(id, "50 250 50");

		}

		else

		{

			CallofDutyAim(id, "255 0 0");

		}

	}

}



public event_statusvalue_hide(id)

{

	if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])

	{

		CallofDutyAim(id, "250 250 50");

	}

}



CallofDutyAim(id, color[])

{

	client_cmd(id, "cl_crosshair_color ^"%s^"", color);

}

  • +
  • -
  • 1

#5 totoff

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:122
  • Imię:christophe
  • Lokalizacja:france
Offline

Napisano 03.06.2011 22:19

thank you
  • +
  • -
  • 0

#6 mad

    Zaawansowany

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:78
  • GG:
  • Steam:steam
  • Imię:Kasper
  • Lokalizacja:Zabrze
Offline

Napisano 22.04.2012 21:30

/ | \
|
|
|
|
Close :D

Użytkownik mad edytował ten post 22.04.2012 21:32

  • +
  • -
  • 0
Dołączona grafika
Dołączona grafika
Dołączona grafika

#7 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6 554
Godlike

  • Postów:11 979
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 22.04.2012 21:33

This message has been generated automatically


This topic has been closed by the moderator.

Reason: Problem solved

If you do not agree with this, Dołączona grafika (report) this post and a moderator or administrator will consider it again.


Regards,
AMXX.PL Team
  • +
  • -
  • 0




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

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