Raised This Month: $51 Target: $400
 12% 

int C_InconsistentFile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thesnakebiter
Senior Member
Join Date: Oct 2011
Old 12-29-2013 , 12:44   int C_InconsistentFile
Reply With Quote #1

I want to make this func ban,and idk how and where to start..
Code:
int C_InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message) {     if (FF_InconsistentFile < 0)         RETURN_META_VALUE(MRES_IGNORED, FALSE);     if (MDLL_InconsistentFile(player, filename, disconnect_message))     {         CPlayer *pPlayer = GET_PLAYER_POINTER((edict_t *)player);         if (executeForwards(FF_InconsistentFile, static_cast<cell>(pPlayer->index),             filename, disconnect_message) == 1)             RETURN_META_VALUE(MRES_SUPERCEDE, FALSE);                 RETURN_META_VALUE(MRES_SUPERCEDE, TRUE);     }     RETURN_META_VALUE(MRES_IGNORED, FALSE); }

Last edited by thesnakebiter; 12-29-2013 at 12:44.
thesnakebiter is offline
Old 12-29-2013, 18:40
fysiks
This message has been deleted by YamiKaitou. Reason: https://forums.alliedmods.net/misc.php?do=showrules
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-01-2014 , 19:28   Re: int C_InconsistentFile
Reply With Quote #2

PHP Code:
int C_InconsistentFile(const edict_t player, const char filenamechar disconnect_message)
{
    
// ...
    
CPlayer pPlayer GET_PLAYER_POINTER((edict_t *)player);

        static 
char cmd[128U];
        const 
char auth GETPLAYERAUTHID(player);
        if (
auth)
        {
          
#if defined __linux__
          
snprintf(cmdsizeof(cmd), "banid 0 \"%s\"; wait; writeid\n"auth);
          
#else
          
_snprintf_s(cmdsizeof(cmd), "banid 0 \"%s\"; wait; writeid\n"auth);
          
#endif

          
SERVER_COMMAND(cmd);
        }

    if (
executeForwards(FF_InconsistentFilestatic_cast<cell>(pPlayer->index),
    
// ...

Next time, try to search http://hg.alliedmods.net/amxmodx-cen...modx/CMisc.cpp
__________________

Last edited by claudiuhks; 02-01-2014 at 19:31.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply



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 00:33.


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