Помогите найти Include плиз

Тема в разделе "Counter-Strike: Source", создана пользователем Fanarrium, 1 янв 2015.

  1. Fanarrium

    Fanarrium

    Сообщения:
    168
    Симпатии:
    14
    Все привет!
    Мне очень нужны эти два инклюда!
    Я весь инет перерыл и не смог их найти(
    #include <database>
    #include <smartdm>
     
  2. R1KO

    R1KO Супер-модератор

    Сообщения:
    5.993
    Симпатии:
    2.989
  3. Fanarrium

    Fanarrium

    Сообщения:
    168
    Симпатии:
    14
    #include <database> встроен в см. Его не нада инклюдить[/QUOTE]

    Скачал sourcemod с офф сайта и чет при компиляции ошибку на него выдает(
     
  4. The End Is Near...

    The End Is Near... Russian Roulette

    Сообщения:
    893
    Симпатии:
    659
    smartdm.inc
    PHP:
    #if !defined _smartdm_include
    #define _smartdm_include

    #define STRING(%1) %1, sizeof(%1)

    stock Downloader_ParseMDL(const String:model[], String:internal[], maxlen1String:files[][], maxsizemaxlen2)
    {
        if(!
    FileExists2(model))
            return 
    0;

        new 
    m_iID;
        new 
    m_iVersion;
        new 
    m_iNum 0;
        new 
    m_iDirNum 0;
        new 
    m_iOffset 0;
        new 
    m_iDirOffset 0;
        new 
    m_iNameOffset 0;
        new 
    m_iIdx 0;

        new 
    Handle:m_hFile OpenFile2(model"rb");
        if(
    m_hFile==INVALID_HANDLE)
            return 
    0;

        
    ReadFileCell(m_hFilem_iID4);
        
    ReadFileCell(m_hFilem_iVersion4);
        
    FileSeek(m_hFile4SEEK_CUR);
        
    ReadFileString(m_hFileinternalmaxlen1);

        
    FileSeek(m_hFile204SEEK_SET);
        
    ReadFileCell(m_hFilem_iNum4);
        
    ReadFileCell(m_hFilem_iOffset4);
        
    ReadFileCell(m_hFilem_iDirNum4);
        
    ReadFileCell(m_hFilem_iDirOffset4);

        new 
    String:m_szPath[PLATFORM_MAX_PATH];
        if(
    m_iDirNum!=0)
        {
            
    FileSeek(m_hFilem_iDirOffsetSEEK_SET);
            
    ReadFileCell(m_hFilem_iDirOffset4);
            
    FileSeek(m_hFilem_iDirOffsetSEEK_SET);
            
    ReadFileString(m_hFileSTRING(m_szPath));
        }

        new 
    String:m_szMaterial[PLATFORM_MAX_PATH];
        for(
    m_iIdx=0;m_iIdx<m_iNum;++m_iIdx)
        {
            
    FileSeek(m_hFilem_iOffset+m_iIdx*64SEEK_SET);
            
    ReadFileCell(m_hFilem_iNameOffset4);
            
    FileSeek(m_hFilem_iNameOffset-4SEEK_CUR);
            
    ReadFileString(m_hFileSTRING(m_szMaterial));

            
    Format(files[m_iIdx], maxlen2"materials\\%s%s.vmt"m_szPathm_szMaterial);
        }

        return 
    m_iNum;
    }

    new 
    String:g_szModelExts[][16] = {".phy"".sw.vtx"".dx80.vtx"".dx90.vtx"".vtx"".xbox.vtx"".vvd"};
    stock Downloader_GetModelFiles(const String:model[], const String:internal[], String:files[][], maxsizemaxlen)
    {
        
    decl String:m_szRawPath1[PLATFORM_MAX_PATH];
        
    decl String:m_szRawPath2[PLATFORM_MAX_PATH];
        
    strcopy(STRING(m_szRawPath1), model);
        
    Format(STRING(m_szRawPath2), "models/%s"internal);

        new 
    m_iDot FindCharInString(m_szRawPath1'.'true);
        if(
    m_iDot == -1)
            return 
    0;
        
    m_szRawPath1[m_iDot] = 0;

        
    m_iDot FindCharInString(m_szRawPath2'.'true);
        if(
    m_iDot == -1)
            return 
    0;
        
    m_szRawPath2[m_iDot] = 0;

        new 
    m_iNum 0;
        for(new 
    i=0;i<sizeof(g_szModelExts);++i)
        {
            if(
    m_iNum == maxsize)
                break;
            
    Format(files[m_iNum], maxlen"%s%s"m_szRawPath1g_szModelExts[i]);
            if(
    FileExists2(files[m_iNum]))
                ++
    m_iNum;
            else
            {
                
    Format(files[m_iNum], maxlen"%s%s"m_szRawPath2g_szModelExts[i]);
                if(
    FileExists2(files[m_iNum]))
                    ++
    m_iNum;
            }
        }
        return 
    m_iNum;
    }

    new 
    String:g_szMaterialKeys[][64] = {"$baseTexture""$bumpmap""$lightwarptexture"};
    stock Downloader_GetMaterialsFromVMT(const String:vmt[], String:materials[][], maxsizemaxlen)
    {
        if(!
    FileExists2(vmt))
            return 
    0;

        
    decl String:m_szLine[512];

        new 
    Handle:m_hFile OpenFile2(vmt"r");
        
        new 
    bool:m_bFound[sizeof(g_szMaterialKeys)];
        
    decl m_iPos;
        
    decl m_iLast;
        new 
    m_iNum 0;
        while(
    ReadFileLine(m_hFilem_szLinesizeof(m_szLine))!=false)
        {
            if(
    m_iNum == sizeof(g_szMaterialKeys) || maxsize == m_iNum)
                break;

            for(new 
    i=0;i<sizeof(g_szMaterialKeys);++i)
            {
                if(
    m_bFound[i])
                    continue;
                if((
    m_iPos StrContains(m_szLineg_szMaterialKeys[i], false)) > 0)
                {
                    
    m_bFound[i]=true;
                    while(
    m_szLine[m_iPos] != '"' && m_szLine[m_iPos] != ' ' && m_szLine[m_iPos] != '    ')
                        ++
    m_iPos;
                    while(
    m_szLine[m_iPos] == ' ' || m_szLine[m_iPos] == '    ' || m_szLine[m_iPos] == '"')
                        ++
    m_iPos;
                    
    m_iLast m_iPos;
                    while(
    m_szLine[m_iLast] != '"' && m_szLine[m_iLast] != '\r' && m_szLine[m_iLast] != '\n' && m_szLine[m_iLast] != ' ' && m_szLine[m_iLast] != '    ' && m_szLine[m_iLast] != 0)
                        ++
    m_iLast;
                    
    m_szLine[m_iLast] = 0;
                    
    strcopy(materials[m_iNum], maxlenm_szLine[m_iPos]);
                    ++
    m_iNum;
                }
            }
        }

        
    CloseHandle(m_hFile);

        return 
    m_iNum;
    }

    new 
    Handle:g_hCachedFiles INVALID_HANDLE;
    new 
    Handle:g_hCachedNums INVALID_HANDLE;
    stock Downloader_AddFileToDownloadsTable(const String:filename[])
    {
        if(!
    FileExists2(filename))
            return 
    0;

        if(
    g_hCachedNums == INVALID_HANDLE)
        {
            
    g_hCachedNums CreateTrie();
            
    g_hCachedFiles CreateArray(PLATFORM_MAX_PATH);
        }

        
    AddFileToDownloadsTable(filename);

        
    decl m_iValue;
        if(
    GetTrieValue(g_hCachedNumsfilenamem_iValue))
        {
            new 
    m_iStart FindStringInArray(g_hCachedFilesfilename)+1;
            
    decl String:m_szFile[PLATFORM_MAX_PATH];
            for(new 
    i=m_iStart-m_iValue-1;i<m_iStart-1;++i)
            {
                if(
    i<0)
                    break;
                
    GetArrayString(g_hCachedFilesim_szFilesizeof(m_szFile));
                
    AddFileToDownloadsTable(m_szFile);
            }
            return 
    true;
        }

        
    decl String:m_szExt[16];
        new 
    m_iDot FindCharInString(filename'.'true);
        if(
    m_iDot == -1)
            return 
    true;

        new 
    m_iNumFiles 0;

        
    strcopy(m_szExtsizeof(m_szExt), filename[m_iDot]);
        
    decl String:m_szMaterials[8][PLATFORM_MAX_PATH];
        
    decl m_iNum;
        if(
    strcmp(m_szExt".mdl") == 0)
        {
            
    decl String:m_szFiles[sizeof(g_szModelExts)][PLATFORM_MAX_PATH];
            new 
    String:m_szInternal[64];

            
    m_iNum Downloader_ParseMDL(filenameSTRING(m_szInternal), m_szMaterialssizeof(m_szMaterials), sizeof(m_szMaterials[]));
            for(new 
    i=0;i<m_iNum;++i)
            {
                if(
    FileExists2(m_szMaterials[i]))
                    
    m_iNumFiles += Downloader_AddFileToDownloadsTable(m_szMaterials[i])+1;
            }

            
    m_iNum Downloader_GetModelFiles(filenamem_szInternalm_szFilessizeof(m_szFiles), sizeof(m_szFiles[]));
            for(new 
    i=0;i<m_iNum;++i)
                
    m_iNumFiles += Downloader_AddFileToDownloadsTable(m_szFiles[i])+1;
        } else if(
    strcmp(m_szExt".vmt") == 0)
        {
            
    m_iNum Downloader_GetMaterialsFromVMT(filenamem_szMaterialssizeof(m_szMaterials), sizeof(m_szMaterials[]));
            
    decl String:m_szMaterial[PLATFORM_MAX_PATH];
            for(new 
    i=0;i<m_iNum;++i)
            {
                
    Format(m_szMaterialsizeof(m_szMaterial), "materials\\%s.vtf"m_szMaterials[i]);
                if(
    FileExists2(m_szMaterial))
                    
    m_iNumFiles += Downloader_AddFileToDownloadsTable(m_szMaterial)+1;
            }
        }

        
    PushArrayString(g_hCachedFilesfilename);
        
    SetTrieValue(g_hCachedNumsfilenamem_iNumFiles);

        return 
    m_iNumFiles;
    }

    new 
    Handle:g_hCustomFiles INVALID_HANDLE;

    public 
    CacheCustomDirectory()
    {
        
    g_hCustomFiles CreateTrie();

        new 
    Handle:m_hDir OpenDirectory("custom");
        if(
    m_hDir == INVALID_HANDLE)
            return;

        new 
    String:m_szDirectory[PLATFORM_MAX_PATH] = "custom/";
        
    decl FileType:m_eType;
        new 
    m_unLen strlen(m_szDirectory);

        while(
    ReadDirEntry(m_hDirm_szDirectory[m_unLen], sizeof(m_szDirectory)-m_unLenm_eType))
        {
            if(
    m_eType != FileType_Directory)
                continue;

            if(
    strcmp(m_szDirectory[m_unLen], ".")==|| strcmp(m_szDirectory[m_unLen], "..")==0)
                continue;

            
    CacheDirectory(m_szDirectory);
        }
        
    CloseHandle(m_hDir);
    }

    public 
    CacheDirectory(const String:directory[])
    {
        new 
    Handle:m_hDir OpenDirectory(directory);
        
    decl String:m_szPath[PLATFORM_MAX_PATH];
        
    decl FileType:m_eType;
        
    Format(STRING(m_szPath), "%s/"directory);
        new 
    m_unLen strlen(m_szPath);
        new 
    m_unOffset FindCharInString(m_szPath'/')+1;
        
    m_unOffset += FindCharInString(m_szPath[m_unOffset], '/')+1;

        while(
    ReadDirEntry(m_hDirm_szPath[m_unLen], sizeof(m_szPath)-m_unLenm_eType))
        {
            if(
    strcmp(m_szPath[m_unLen], ".")==|| strcmp(m_szPath[m_unLen], "..")==0)
                continue;

            if(
    m_eType == FileType_Directory)
                
    CacheDirectory(m_szPath);
            else if(
    m_eType == FileType_File)
            {
                
    SetTrieString(g_hCustomFilesm_szPath[m_unOffset], m_szPath);
            }
        }
        
    CloseHandle(m_hDir);
    }

    stock Handle:OpenFile2(const String:file[], const String:mode[])
    {
        if(
    g_hCustomFiles == INVALID_HANDLE)
            
    CacheCustomDirectory();

        
    decl String:m_szPath[PLATFORM_MAX_PATH];
        if(!
    GetTrieString(g_hCustomFilesfileSTRING(m_szPath)))
        {
            
    strcopy(STRING(m_szPath), file);
        }

        return 
    OpenFile(m_szPathmode);
    }

    stock bool:FileExists2(const String:file[])
    {
        if(
    g_hCustomFiles == INVALID_HANDLE)
            
    CacheCustomDirectory();

        
    decl String:m_szPath[PLATFORM_MAX_PATH];
        if(!
    GetTrieString(g_hCustomFilesfileSTRING(m_szPath)))
            return 
    FileExists(file);

        return 
    FileExists(m_szPath);
    }

    #endif

    Добавлено через 1 минуту
    И покажи сам код, который пытаешься скомпилить
     
    Последнее редактирование: 1 янв 2015
  5. Fanarrium

    Fanarrium

    Сообщения:
    168
    Симпатии:
    14
    Добавлено через 1 минуту

    И покажи сам код, который пытаешься скомпилить[/QUOTE]

    #pragma semicolon 1
    #include <sourcemod>
    #include <basestock>
    #include <database>
    #include <sdktools>
    /**
    * =============================================================================
    * ImDawe plugin
    * www.neogames.eu Plugin / Mod request section for plugin request
    * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
    * CONTACT:
    * MSN/MAIL: [email protected]
    * STEAM: csokikola
    * Add me if you have any question
    * =============================================================================
    */

    /***************
    DEFINES
    ***************/
    #define VERSION "1.0"
    #define NAME "[CSS] !TURREt"
    #define AUTHOR "ImDawe"
    #define DESCRIPTION "!TURRET"

    /***************
    CVARS
    ***************/

    /***************
    VARIABLES
    ***************/
    new g_Turrets[MAXPLAYERS+1]={-1,...};
    new bool:g_TurretCanShoot[MAXPLAYERS+1]={true,...};
    new Float:g_fTurretAim[MAXPLAYERS+1]={0.0,...};
    new bool:g_bTurretAim[MAXPLAYERS+1]={true,...};
    new Float:MinNadeHull[3] = {-2.5, -2.5, -2.5};
    new Float:MaxNadeHull[3] = {5.5, 5.5, 5.5};
    new bool:g_BringTurret[MAXPLAYERS+1]={false,...};
    new g_BeamSprite;
    new g_HaloSprite;
    /***************
    INCLUDES
    ***************/

    /***************
    REGISTER PLUGIN
    ***************/

    public Plugin:myinfo =
    {
    name = NAME,
    author = AUTHOR,
    description = DESCRIPTION,
    version = VERSION,
    url = ""
    };

    public OnPluginStart()
    {


    RegisterConVar("sm_turret_version", VERSION, "Version of x plugin", TYPE_STRING);

    RegConsoleCmd("sm_turret", CreateTurret);

    HookEvent("round_start", OnRoundStart);
    PrecacheSound("player/damage1.wav");
    PrecacheSound("player/damage2.wav");
    PrecacheSound("player/damage3.wav");
    g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
    g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
    }


    public Action:OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    {
    for(new i=0;i<64;++i)
    {
    g_Turrets=-1;
    g_TurretCanShoot=true;
    g_BringTurret=false;
    }
    return Plugin_Continue;
    }


    /***************
    FUNCTIONS
    ***************/


    public Action:CreateTurret(client, args)
    {
    if(g_Turrets[client] != -1)
    {
    PrintToChat(client, "You have a turret already!");
    return Plugin_Handled;
    }
    new ent = CreateEntityByName("prop_physics_override");
    if(ent != -1)
    {
    PrecacheModel("models/Combine_turrets/floor_turret.mdl");
    SetEntityModel(ent, "models/Combine_turrets/floor_turret.mdl");
    DispatchSpawn(ent);

    SetEntPropFloat(ent, Prop_Send, "m_flCycle", 0.1);

    decl Float:pos[3], Float:angle[3], Float:vecDir[3];

    GetClientEyeAngles(client, angle);
    GetAngleVectors(angle, vecDir, NULL_VECTOR, NULL_VECTOR);
    GetClientEyePosition(client, pos);

    pos[0]+=vecDir[0]*100.0;
    pos[1]+=vecDir[1]*100.0;
    pos[2]-=60.0;
    angle[0]=0.0;
    TeleportEntity(ent, pos, angle, NULL_VECTOR);
    g_Turrets[client]=ent;
    }else{
    PrintToChat(client, "Invalid enttiy:(");
    }
    }

    public OnGameFrame()
    {
    LoopIngamePlayers(i)
    {
    if(g_Turrets!=-1)
    {
    TickTurret(i);
    }
    }
    }

    TickTurret(client)
    {
    new ClosestEnemy;
    new Float:EnemyDistance;
    decl Float:TurretPos[3];

    GetEntPropVector(g_Turrets[client], Prop_Send, "m_vecOrigin", TurretPos);
    new iTeam = GetClientTeam(client);
    for(new i=1;i<MaxClients;++i)
    {
    if(IsClientInGame(i) && IsPlayerAlive(i))
    if (GetClientTeam(i) != iTeam)
    {
    decl Float:EnemyPos[3];
    GetClientEyePosition(i, EnemyPos);
    new Float:m_vecMins[3];
    new Float:m_vecMaxs[3];
    GetEntPropVector(g_Turrets[client], Prop_Send, "m_vecMins", m_vecMins);
    GetEntPropVector(g_Turrets[client], Prop_Send, "m_vecMaxs", m_vecMaxs);

    TR_TraceHullFilter(TurretPos, EnemyPos, m_vecMins, m_vecMaxs, MASK_SOLID, DontHitOwnerOrNade, client);
    if(TR_GetEntityIndex() == i)
    {
    TurretTickFollow(client, i);
    return;
    }
    }
    }
    TurretTickIdle(client);
    }

    TurretTickIdle(client)
    {
    if(g_fTurretAim[client] <= 0.1)
    {
    g_bTurretAim[client]=true;
    }
    if(g_fTurretAim[client] >= 0.9)
    {
    g_bTurretAim[client]=false;
    }



    if(g_bTurretAim[client])
    {
    g_fTurretAim[client]=FloatAdd(g_fTurretAim[client], 0.01);
    }
    else{
    g_fTurretAim[client]=FloatSub(g_fTurretAim[client], 0.01);
    }
    SetEntPropFloat(g_Turrets[client], Prop_Send, "m_flPoseParameter", g_fTurretAim[client], 0);
    SetEntPropFloat(g_Turrets[client], Prop_Send, "m_flPoseParameter", 0.5, 1);
    }

    TurretTickFollow(owner, player)
    {
    decl Float:TurretPos[3], EnemyPos[3], Float:EnemyAngle[3], Float:TuretAngle[3], Float:vecDir[3];

    GetEntPropVector(g_Turrets[owner], Prop_Send, "m_angRotation", TuretAngle);
    GetEntPropVector(g_Turrets[owner], Prop_Send, "m_vecOrigin", TurretPos);
    GetClientAbsOrigin(player, EnemyPos);

    MakeVectorFromPoints(EnemyPos, TurretPos, vecDir);
    GetVectorAngles(EnemyPos, EnemyAngle);
    GetVectorAngles(vecDir, vecDir);
    vecDir[2]=0.0;

    TuretAngle[1]+=180.0;

    new Float:m_iDegreesY = 0.0;
    new Float:m_iDegreesX= (((vecDir[1]-TuretAngle[1])+30.0)/60.0);

    if(m_iDegreesX < 0.0 || m_iDegreesX > 1.0)
    {
    TurretTickIdle(owner);
    return;
    }
    g_fTurretAim[owner] = m_iDegreesX;
    SetEntPropFloat(g_Turrets[owner], Prop_Send, "m_flPoseParameter", m_iDegreesX, 0);
    SetEntPropFloat(g_Turrets[owner], Prop_Send, "m_flPoseParameter", m_iDegreesY, 1);

    if(g_TurretCanShoot[owner])
    {
    TurretPos[2]+=50.0;
    EnemyPos[2]=FloatAdd(EnemyPos[2], GetRandomFloat(10.0, 40.0));
    EnemyPos[0]=FloatAdd(EnemyPos[0], GetRandomFloat(-5.0, 5.0));
    EnemyPos[1]=FloatAdd(EnemyPos[1], GetRandomFloat(-5.0, 5.0));
    TE_SetupBeamPoints(TurretPos, EnemyPos, g_BeamSprite, g_HaloSprite, 0, 30, GetRandomFloat(0.1, 0.3), 1.0, 1.0, 0, 1.0, {255,250,0, 100}, 0);
    TE_SendToAll();
    new hp = GetClientHealth(player)-15;
    if(hp <= 0.0)
    {
    ForcePlayerSuicide(player);
    }else{
    SetEntityHealth(player, hp);
    decl String:szFile[128];
    Format(szFile, sizeof(szFile), "player/damage%d.wav", GetRandomInt(1, 3));
    EmitSoundToClient(player, szFile);
    EmitAmbientSound("weapons/sg550/sg550-1.wav", TurretPos);
    }
    g_TurretCanShoot[owner]=false;
    CreateTimer(0.1, TurretSetState, owner);
    }
    }

    public Action:TurretSetState(Handle:Timer, any:data)
    {
    g_TurretCanShoot[data]=true;

    }

    public bool:DontHitOwnerOrNade(entity, contentsMask, any:data)
    {
    if(entity > 0 && entity < 65 && IsClientInGame(entity))
    return true;
    return false;
    }


    public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
    {
    if(g_BringTurret[client] && IsPlayerAlive(client))
    {
    if(buttons & IN_USE)
    {
    g_BringTurret[client]=false;
    }else{
    decl Float:pos[3], Float:angle[3], Float:vecDir[3];

    GetClientEyeAngles(client, angle);
    GetAngleVectors(angle, vecDir, NULL_VECTOR, NULL_VECTOR);
    GetClientEyePosition(client, pos);

    pos[0]+=vecDir[0]*100.0;
    pos[1]+=vecDir[1]*100.0;
    pos[2]-=60.0;
    angle[0]=0.0;
    TeleportEntity(g_Turrets[client], pos, angle, NULL_VECTOR);
    }
    }else{
    if(buttons & IN_USE )
    {
    new ent = GetClientAimTarget(client, false);
    if(g_Turrets[client]==ent && ent != -1)
    {
    g_BringTurret[client]=true;
    }
    }
    }

    }

    public OnMapStart()
    {
    PrecacheSound("weapons/sg550/sg550-1.wav");
    PrecacheSound("player/damage1.wav");
    PrecacheSound("player/damage2.wav");
    PrecacheSound("player/damage3.wav");
    g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
    g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
    }
    /***************
    NATIVES
    ***************/


    Добавлено через 14 минут
    Помогите плиз( Очень надо
     
    Последнее редактирование: 1 янв 2015
  6. The End Is Near...

    The End Is Near... Russian Roulette

    Сообщения:
    893
    Симпатии:
    659
    Fanarrium
    используй
    Код:
    [PHP ]//ТвойКод[/PHP] (без пробела)
     
  7. Fanarrium

    Fanarrium

    Сообщения:
    168
    Симпатии:
    14
    Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

    css_turret.sp(5) : fatal error 120: cannot read from file: "database"

    Compilation aborted.
    1 Error.