Raised This Month: $ Target: $400
 0% 

[HELP] Error Complete 3


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SpannerSpammer
Member
Join Date: Mar 2006
Old 05-06-2016 , 18:54   Re: [HELP] Error Complete 3
Reply With Quote #4

Code:
#define is_valid_player(%1) (1 <= %1 <= 32)
This is NOT a validity check, this is just an out of bounds check for a player index.

This is a real validity check you should use:
Code:
stock bool:is_valid_player( id )
{
    return ( pev_valid(id) && (id >= 1) && (id <= g_MaxPlayers) && is_user_connected(id) && !is_user_hltv(id) );
}
Line 207 of your code:
Code:
if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4A1[attacker] )
g_HasM4A1 is an undefined variable in your code , which I don't think you need since get_user_weapon()
already checks if the player has this weapon. Remove it from your code:
Code:
if ( is_valid_player( attacker ) && (get_user_weapon(attacker) == CSW_M4A1) )
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf
SpannerSpammer is offline
 



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 18:41.


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