So... It blocks it but for some reason it gives me a crap load of errors
PHP Code:
//define
#define fm_cs_set_user_nobuy(%1) set_pdata_int(%1, 235, get_pdata_int(%1, 235) & ~(1<<0) )
//Plugin init
register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon");
public Message_StatusIcon(iMsgId, iMsgDest, id)
{
if(g_KnivesOnly)
{
static szIcon[8];
get_msg_arg_string(2, szIcon, charsmax(szIcon));
if( equal(szIcon, "buyzone") )
{
if( get_msg_arg_int(1) )
{
fm_cs_set_user_nobuy(id);
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_CONTINUE;
}
Code:
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 11 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 14 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 15 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 16 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 17 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 18 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 19 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
L 07/19/2011 - 02:15:04: [HAMSANDWICH] Invalid player 20 (not in-game)
L 07/19/2011 - 02:15:04: [AMXX] Displaying debug trace (plugin "VoteKnivesOnly.amxx")
L 07/19/2011 - 02:15:04: [AMXX] Run time error 10: native error (native "get_pdata_cbase")
L 07/19/2011 - 02:15:04: [AMXX] [0] VoteKnivesOnly.sma::StripUserWeapons (line 268)
I tried using is_user_connected(id) and it still gives the errors... it hates me lol i know.. Any ideas why it gives these issues?
Thanks in advanced for the help.