[SOLVED] call_of_duty_aim plugin
totoff
16.05.2011
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?
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 }
*/
DarkGL
18.05.2011
#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); }
DarkGL
22.04.2012
This message has been generated automatically
This topic has been closed by the moderator.
Reason: Problem solved
If you do not agree with this, (report) this post and a moderator or administrator will consider it again.
Regards,
AMXX.PL Team
This topic has been closed by the moderator.
Reason: Problem solved
If you do not agree with this, (report) this post and a moderator or administrator will consider it again.
Regards,
AMXX.PL Team