|
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
|
08-30-2014
, 16:23
Re: [help] deagle round plugin. plz fix
|
#11
|
Quote:
Originally Posted by popeye10
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <dhudmessage>
#include <colorchat>
#pragma semicolon 1
#define TASKID 1234
#define ACCESS ADMIN_CVAR
new PLUG[] = "Deagle round";
new VERS[] = "0.1";
new AUTH[] = "EpicKiller";
new bool:DeagleRound;
public plugin_init()
{
register_plugin(PLUG, VERS, AUTH);
register_event("CurWeapon", "cmdCurWeapon", "be", "1=1", "2!26");
register_event("CurWeapon","switchweapon","be","1=1","2!26");
register_logevent("deagle_round_end", 2, "1=Round_End");
register_concmd("deagleround", "cmdDeagleRound");
register_concmd("dglr", "cmdDeagleRound");
register_clcmd("say !deagleround", "cmdDeagleRound");
register_clcmd("say_team !deagleround", "cmdDeagleRound");
}
public cmdCurWeapon(id)
{
if(DeagleRound)
{
if(!user_has_weapon(id, CSW_DEAGLE))
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
engclient_cmd(id, "weapon_deagle");
}
}
public deagle_round_end()
DeagleRound = false;
public cmdDeagleRound(id)
{
if(get_user_flags(id) & ACCESS)
{
DeagleRound = true;
set_dhudmessage(0, 160, 0, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5);
show_dhudmessage(id, "Deagle Round Start");
}
else
client_print_color(id, 0, "^4%s ^3You have no ^4access ^3to this command!");
return PLUGIN_CONTINUE;
}
public switchweapon(id)
{
if(task_exists(TASKID))
{
engclient_cmd(id, "weapon_deagle");
}
}
little changes.
thanx EpicKiller
working perfect
|
Great, I'm glad to have helped you!
__________________
~ Swiftly and with style ~
|
|
|
|