Raised This Month: $ Target: $400
 0% 

[REQ]Help for Plugin Scripting


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Atanasov25
Junior Member
Join Date: Nov 2013
Location: Shumen/Bulgaria
Old 12-21-2013 , 12:23   [REQ]Help for Plugin Scripting
Reply With Quote #1

I get the following error http://imageshack.com/a/img823/25/x8cf.png
Can someone help me with this ?

#include <amxmodx>
#include <amxmisc>

#define ADMIN_ACCESS ADMIN_LEVEL_H
#define KEY_MENU_FLASH 2

new g_iActive;
new g_iTextMsg;

public plugin_init()
{
register_plugin("VIPFlashbang",AMXX_VERSION_S TR,"Nobody");

g_iActive = register_cvar("amx_restrict_flash","1");

g_iTextMsg = get_user_msgid("FlashBangs are only for V.I.P Players");

register_menucmd(register_menuid("BuyItem",1) ,511,"CMD_ItemMenu");
register_menucmd(-34,511,"CMD_ItemMenu");
}


public client_command(id)
{
if(get_pcvar_num(g_iActive) && !access(id,ADMIN_ACCESS))
{
new szCommand[32];
read_argv(0,szCommand,charsmax(szCommand));

if(equal("flash",szCommand))
{
message_begin(MSG_ONE_UNRELIABLE,g_iTextMsg, .player= id);
{
write_byte(print_center);
write_string("#Alias_Not_Avail");
write_string("#Flashbang");
}
message_end();

return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}

public CS_InternalCommand(id,const szCommand[])
{
if(get_pcvar_num(g_iActive) && !access(id,ADMIN_ACCESS))
{
if(equal("flash",szCommand))
{
message_begin(MSG_ONE_UNRELIABLE,g_iTextMsg, .player= id);
{
write_byte(print_center);
write_string("#Alias_Not_Avail");
write_string("#Flashbang");
}
message_end();

return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}

public CMD_ItemMenu(id,iKey)
{
if(get_pcvar_num(g_iActive) && !access(id,ADMIN_ACCESS))
{
if(iKey == KEY_MENU_FLASH)
{
message_begin(MSG_ONE_UNRELIABLE,g_iTextMsg, .player= id);
{
write_byte(print_center);
write_string("#Alias_Not_Avail");
write_string("#Flashbang");
}
message_end();

return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
Atanasov25 is offline
Send a message via Skype™ to Atanasov25
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode