block sm plugins

Тема в разделе "Counter-Strike: Source", создана пользователем SaInT.P, 6 июл 2015.

  1. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    Всем привет, как то на каком то сервере увидел при написаний sm plugins в консоль мне выдало в консоль вот это
    Оффтоп
    не могли бы написать этот простой плагин,либо скинуть может где то или у кого то есть, спасибо,
     
  2. Napas

    Napas

    Сообщения:
    471
    Симпатии:
    38
  3. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    Napas, я скомпилил попробовал вот так, не получается
    PHP:
    #include <sourcemod>
    #include <dhooks>
    #include <sdktools>

    new Handle:hClientPrintf INVALID_HANDLE;

    public 
    OnPluginStart()
    {    
        new 
    Handle:gameconf LoadGameConfigFile("clientprintf-hook.games");
        if(
    gameconf == INVALID_HANDLE)
        {
            
    SetFailState("Failed to find clientprintf-hook.games.txt gamedata");
        }
        new 
    offset GameConfGetOffset(gameconf"ClientPrintf");
        if(
    offset == -1)
        {
            
    SetFailState("Failed to find offset for ClientPrintf");
            
    CloseHandle(gameconf);
        }
        
    StartPrepSDKCall(SDKCall_Static);
        if(!
    PrepSDKCall_SetFromConf(gameconfSDKConf_Signature"CreateInterface"))
        {
            
    SetFailState("Failed to get CreateInterface");
            
    CloseHandle(gameconf);
        }
        
        
    PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer);
        
    PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_PointerVDECODE_FLAG_ALLOWNULL);
        
    PrepSDKCall_SetReturnInfo(SDKType_PlainOldDataSDKPass_Plain);
        
        new 
    String:interface[64];
        if(!
    GameConfGetKeyValue(gameconf"EngineInterface", interface, sizeof(interface)))
        {
            
    SetFailState("Failed to get engine interface name");
            
    CloseHandle(gameconf);
        }
        
        new 
    Handle:temp EndPrepSDKCall();
        new 
    Address:addr SDKCall(temp, interface, 0);
        
        
    CloseHandle(gameconf);
        
    CloseHandle(temp);
        
        if(!
    addrSetFailState("Failed to get engine ptr");
        
        
    hClientPrintf DHookCreate(offsetHookType_RawReturnType_VoidThisPointer_IgnoreHook_ClientPrintf);
        
    DHookAddParam(hClientPrintfHookParamType_Edict);
        
    DHookAddParam(hClientPrintfHookParamType_CharPtr);
        
    DHookRaw(hClientPrintffalseaddr);
    }
    public 
    MRESReturn:Hook_ClientPrintf(Handle:hParams)
    {
        
    decl String:buffer[1024];
        
    DHookGetParamString(hParams2buffer1024);
        if(
    buffer[1] == '"' && (StrContains(buffer"\" (") != -|| (StrContains(buffer".smx\" ") != -1))) 
        {
            
    DHookSetParamString(hParams2"");
            return 
    MRES_ChangedHandled;
        }
        else if(
    StrContains(buffer"To see more, type \"sm plugins") != -1)
        {
            
    DHookSetParamString(hParams2"¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n 
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n 
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n 
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n
    ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶"
    );
            return 
    MRES_ChangedHandled;
        }
        return 
    MRES_Ignored;
    }
    Ошибки такие
    sm_plugins_block.sp(31) : error 173: 'interface' is a newly reserved keyword that may be used in the future; use a different name as an identifier
    sm_plugins_block.sp(32) : error 173: 'interface' is a newly reserved keyword that may be used in the future; use a different name as an identifier
    sm_plugins_block.sp(32) : error 173: 'interface' is a newly reserved keyword that may be used in the future; use a different name as an identifier
    sm_plugins_block.sp(39) : error 173: 'interface' is a newly reserved keyword that may be used in the future; use a different name as an identifier
    sm_plugins_block.sp(62) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(63) : warning 217: loose indentation
    sm_plugins_block.sp(63) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(63) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(63) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(63) : fatal error 189: too many error messages on one line
     
  4. AlmazON

    AlmazON деревянный © yand3xmail

    Сообщения:
    4.563
    Симпатии:
    1.988
    Замени везде это на другое слово (одинаковое).
    Остальное - ему твоё сообщение не нравится, попробуй соблюдать "лесенку".
     
    TWRP и SaInT.P нравится это.
  5. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, не получилось что-то
     
  6. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, и как сделать лучше? чтоб не палили и не смогли пропалить?
     
  7. AlmazON

    AlmazON деревянный © yand3xmail

    Сообщения:
    4.563
    Симпатии:
    1.988
    Да не, просто бессмысленности есть в коде, он малооптимален. Но, работает же, говорят.
     
    TWRP нравится это.
  8. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, Вот что если поменять на "q"

    sm_plugins_block.sp(62 -- 63) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(64) : error 017: undefined symbol "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(65) : error 139: could not find type "n"
    sm_plugins_block.sp(65) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(66) : error 139: could not find type "n"
    sm_plugins_block.sp(66) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(67) : error 139: could not find type "n"
    sm_plugins_block.sp(67) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(68) : error 139: could not find type "n"
    sm_plugins_block.sp(68) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(69) : error 139: could not find type "n"
    sm_plugins_block.sp(69) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(70) : error 139: could not find type "n"
    sm_plugins_block.sp(70) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(71) : error 139: could not find type "n"
    sm_plugins_block.sp(71) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(72) : error 139: could not find type "n"
    sm_plugins_block.sp(72) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(73) : error 139: could not find type "n"
    sm_plugins_block.sp(73) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(74) : error 139: could not find type "n"
    sm_plugins_block.sp(74) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(75) : error 139: could not find type "n"
    sm_plugins_block.sp(75) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(76) : error 139: could not find type "n"
    а с тем выдает
    sm_plugins_block.sp(62 -- 63) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : fatal error 189: too many error messages on one line
     
  9. AlmazON

    AlmazON деревянный © yand3xmail

    Сообщения:
    4.563
    Симпатии:
    1.988
    Дело ещё такое: ты можешь записать до 1024 символов (русских в 2 раза меньше - это предел консоли), а твой импровизированный "фак" более чем в 2 раза больше занимает места. Наверное можно его оставить, но разбить на 3 сообщения.
     
    TWRP нравится это.
  10. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, Я не сильно шарю именно в этом, можешь сделать пожалуйста?
     
  11. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON,это с q
    sm_plugins_block.sp(62 -- 63) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(64) : error 017: undefined symbol "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(65) : error 139: could not find type "n"
    sm_plugins_block.sp(65) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(66) : error 139: could not find type "n"
    sm_plugins_block.sp(66) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(67) : error 139: could not find type "n"
    sm_plugins_block.sp(67) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(68) : error 139: could not find type "n"
    sm_plugins_block.sp(68) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(69) : error 139: could not find type "n"
    sm_plugins_block.sp(69) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(70) : error 139: could not find type "n"
    sm_plugins_block.sp(70) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(70) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(70) : fatal error 189: too many error messages on one line

    а это с тем знаком
    sm_plugins_block.sp(62 -- 63) : error 037: invalid string (possibly non-terminated string)
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : error 029: invalid expression, assumed zero
    sm_plugins_block.sp(64) : fatal error 189: too many error messages on one line
     
  12. jonasltu

    jonasltu

    Сообщения:
    25
    Симпатии:
    10
    использую
     

    Вложения:

    TWRP нравится это.
  13. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, в одну строку компильнулся без ошибок, теперь не могу найти dhooks , качаю тут , ставлю но пишет
    L 07/06/2015 - 17:44:02: [SM] Unable to load extension "dhooks.ext": /home/lala/lala/MiniGame/cstrike/addons/sourcemod/extensions/dhooks.ext.so: cannot open shared object file: No such file or directory
    L 07/06/2015 - 17:44:03: [SM] Unable to load plugin "sm_plugins_block.smx": Required extension "dhooks" file("dhooks.ext") not running
    не могу найти dhooks.ext.so
     
  14. komashchenko

    komashchenko

    Сообщения:
    479
    Симпатии:
    421
    PHP:
    #include <sourcemod>
    #include <dhooks>
    #include <sdktools>

    new Handle:hClientPrintf INVALID_HANDLE;

    public 
    OnPluginStart()
    {    
        new 
    Handle:gameconf LoadGameConfigFile("clientprintf-hook.games");
        if(
    gameconf == INVALID_HANDLE)
        {
            
    SetFailState("Failed to find clientprintf-hook.games.txt gamedata");
        }
        new 
    offset GameConfGetOffset(gameconf"ClientPrintf");
        if(
    offset == -1)
        {
            
    SetFailState("Failed to find offset for ClientPrintf");
            
    CloseHandle(gameconf);
        }
        
    StartPrepSDKCall(SDKCall_Static);
        if(!
    PrepSDKCall_SetFromConf(gameconfSDKConf_Signature"CreateInterface"))
        {
            
    SetFailState("Failed to get CreateInterface");
            
    CloseHandle(gameconf);
        }
        
        
    PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer);
        
    PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_PointerVDECODE_FLAG_ALLOWNULL);
        
    PrepSDKCall_SetReturnInfo(SDKType_PlainOldDataSDKPass_Plain);
        
        new 
    String:interface1[64];
        if(!
    GameConfGetKeyValue(gameconf"EngineInterface"interface1sizeof(interface1)))
        {
            
    SetFailState("Failed to get engine interface name");
            
    CloseHandle(gameconf);
        }
        
        new 
    Handle:temp EndPrepSDKCall();
        new 
    Address:addr SDKCall(tempinterface10);
        
        
    CloseHandle(gameconf);
        
    CloseHandle(temp);
        
        if(!
    addrSetFailState("Failed to get engine ptr");
        
        
    hClientPrintf DHookCreate(offsetHookType_RawReturnType_VoidThisPointer_IgnoreHook_ClientPrintf);
        
    DHookAddParam(hClientPrintfHookParamType_Edict);
        
    DHookAddParam(hClientPrintfHookParamType_CharPtr);
        
    DHookRaw(hClientPrintffalseaddr);
    }
    public 
    MRESReturn:Hook_ClientPrintf(Handle:hParams)
    {
        
    decl String:buffer[1024];
        
    DHookGetParamString(hParams2buffer1024);
        if(
    buffer[1] == '"' && (StrContains(buffer"\" (") != -|| (StrContains(buffer".smx\" ") != -1))) 
        {
            
    DHookSetParamString(hParams2"");
            return 
    MRES_ChangedHandled;
        }
        else if(
    StrContains(buffer"To see more, type \"sm plugins") != -1)
        {
            
    DHookSetParamString(hParams2"¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶"
    );
            return 
    MRES_ChangedHandled;
        }
        return 
    MRES_Ignored;
    }  
     
  15. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    komashchenko, Можешь скинуть пожалуста dhooks а то без него не хочет работать, а найти не могу dhooks
     
  16. AlmazON

    AlmazON деревянный © yand3xmail

    Сообщения:
    4.563
    Симпатии:
    1.988
    Тебе же давали тему. Там есть ссылка (качать лучше самый первый).
     
  17. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    AlmazON, не видел чтото
    Разделен на три сообщения выдает ошибку при запуске но компилируеться нормально
    Добавлено через 9 минут
    L 07/06/2015 - 19:15:59: [SM] Native "SetFailState" reported: Failed to get CreateBufferConf
    L 07/06/2015 - 19:15:59: [SM] Displaying call stack trace for plugin "sm_plugins_block.smx":
    L 07/06/2015 - 19:15:59: [SM] [0] Line 23, sm_plugins_block.sp::OnPluginStart()

    Целиком который!
    ] sm plugins list
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
     
    Последнее редактирование: 6 июл 2015
  18. komashchenko

    komashchenko

    Сообщения:
    479
    Симпатии:
    421
    от нормально работать будет
    PHP:
    #include <sourcemod>
    #include <dhooks>
    #include <sdktools>

    new Handle:hClientPrintf INVALID_HANDLE;

    public 
    OnPluginStart()
    {
        new 
    Handle:gameconf LoadGameConfigFile("clientprintf-hook.games");
        if (
    gameconf == INVALID_HANDLE)
        {
            
    SetFailState("Failed to find clientprintf-hook.games.txt gamedata");
        }
        new 
    offset GameConfGetOffset(gameconf"ClientPrintf");
        if (
    offset == -1)
        {
            
    SetFailState("Failed to find offset for ClientPrintf");
            
    CloseHandle(gameconf);
        }
        
    StartPrepSDKCall(SDKCall_Static);
        if (!
    PrepSDKCall_SetFromConf(gameconfSDKConf_Signature"CreateInterface"))
        {
            
    SetFailState("Failed to get CreateInterface");
            
    CloseHandle(gameconf);
        }
        
        
    PrepSDKCall_AddParameter(SDKType_StringSDKPass_Pointer);
        
    PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_PointerVDECODE_FLAG_ALLOWNULL);
        
    PrepSDKCall_SetReturnInfo(SDKType_PlainOldDataSDKPass_Plain);
        
        new 
    String:interface1[64];
        if (!
    GameConfGetKeyValue(gameconf"EngineInterface"interface1sizeof(interface1)))
        {
            
    SetFailState("Failed to get engine interface name");
            
    CloseHandle(gameconf);
        }
        
        new 
    Handle:temp EndPrepSDKCall();
        new 
    Address:addr SDKCall(tempinterface10);
        
        
    CloseHandle(gameconf);
        
    CloseHandle(temp);
        
        if (!
    addr)SetFailState("Failed to get engine ptr");
        
        
    hClientPrintf DHookCreate(offsetHookType_RawReturnType_VoidThisPointer_IgnoreHook_ClientPrintf);
        
    DHookAddParam(hClientPrintfHookParamType_Edict);
        
    DHookAddParam(hClientPrintfHookParamType_CharPtr);
        
    DHookRaw(hClientPrintffalseaddr);
    }
    public 
    MRESReturn:Hook_ClientPrintf(Handle:hParams)
    {
        
    decl String:buffer[1024];
        
    int iClient DHookGetParam(hParams1);
        
    DHookGetParamString(hParams2buffer1024);
        if (
    buffer[1] == '"' && (StrContains(buffer"\" (") != -|| (StrContains(buffer".smx\" ") != -1)))
        {
            
    DHookSetParamString(hParams2"");
            return 
    MRES_ChangedHandled;
        }
        else if (
    StrContains(buffer"To see more, type \"sm plugins") != -1)
        {
            
    PrintToConsole(iClient" ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶"
    );
            
    PrintToConsole(iClient" ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶"
    );
            
    PrintToConsole(iClient" ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
    ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶"
    );
            
    DHookSetParamString(hParams2" ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
    ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n "
    );
            return 
    MRES_ChangedHandled;
        }
        return 
    MRES_Ignored;
     
    SaInT.P нравится это.
  19. SaInT.P

    SaInT.P

    Сообщения:
    1.270
    Симпатии:
    237
    komashchenko, Зачет!Спасибо!

    Добавлено через 14 часов 0 минут
    komashchenko, Почемуто он после смены карты перестал блокировать команду sm plugins list и стал показывать плагины снова
     
    Последнее редактирование: 7 июл 2015
  20. miracle

    miracle

    Сообщения:
    82
    Симпатии:
    1
    Привет всем.

    а для v34 есть такое плагин, который будет на ней работать?
    ответьте кто знает