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

ReAPI natives?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-04-2018 , 10:37   ReAPI natives?
Reply With Quote #1

Any one can give me full reapi natives, i looking for making some reapi plugins
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-04-2018 , 10:56   Re: ReAPI natives?
Reply With Quote #2

Just check reapi.inc lol.
__________________
klippy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-04-2018 , 12:23   Re: ReAPI natives?
Reply With Quote #3

Or check here.
__________________

Last edited by OciXCrom; 01-04-2018 at 12:23.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-04-2018 , 15:33   Re: ReAPI natives?
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
that exactly what i was search =)
Tyyy
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 01-04-2018 , 15:37   Re: ReAPI natives?
Reply With Quote #5

I remember giving that url to you some time ago. You should have remembered.
__________________
retired chump
DjSoftero is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-04-2018 , 15:44   Re: ReAPI natives?
Reply With Quote #6

also ther is a natives to prechase in reapi ? thinking to post reapi admin models ;)
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-04-2018 , 15:44   Re: ReAPI natives?
Reply With Quote #7

Quote:
Originally Posted by DjSoftero View Post
I remember giving that url to you some time ago. You should have remembered.
i searched in my posts and i didnt find it so i maked a thread to ask and could you give me some ideas and suggestion about an reapi plugin not maked yet?
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 01-04-2018 , 20:52   Re: ReAPI natives?
Reply With Quote #8

Quote:
Originally Posted by D3XT3R View Post
also ther is a natives to prechase in reapi ? thinking to post reapi admin models ;)
reapi admin models has been done, look at this code

PHP Code:
#include <amxmodx>
#include <reapi>

enum player_models szTTModel[64], szCTModel[64], iFlag }


/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

#define SET_MODELINDEX
#define MAX_MODEL_PATH_LEN     128

/// FORMAT: "Terrorist Model" "Counter-Terrorist Model"  "Access Flag" 

new const g_eModelsData[][player_models] = 
{
    { 
"snowleet""lolgign"ADMIN_LEVEL_B },
    { 
"viptt""vipct"ADMIN_LEVEL_H },
    { 
"bomjtt""bomjct"ADMIN_ALL },
    

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

    
{"""", -1// don't touch it!! 
}

#define IsValidArrayIndex(%1)         (0 <= %1 <= sizeof(g_eModelsData)-1)

#if defined SET_MODELINDEX
    
new g_iTTModelIndex[sizeof(g_eModelsData)], g_iCTModelIndex[sizeof(g_eModelsData)]
#endif


public plugin_precache()
{
    if(
g_eModelsData[0][iFlag] == -1)
    {
        
set_fail_state("Array g_eModelsData are empty!")
        return
    }

    for(new 
0sizeof(g_eModelsData)-1i++)
    {
    
#if defined SET_MODELINDEX
        
g_iTTModelIndex[i] = precache_player_model(g_eModelsData[i][szTTModel])
        
g_iCTModelIndex[i] = precache_player_model(g_eModelsData[i][szCTModel])
    
#else
        
precache_player_model(g_eModelsData[i][szTTModel])
        
precache_player_model(g_eModelsData[i][szCTModel])
    
#endif
    
}
}

public 
plugin_init()
{
    
register_plugin("[ReAPI] Admin Models""0.0.2""Vaqtincha")

    
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoModel"SetClientUserInfoModel", .post false)
}


public 
SetClientUserInfoModel(const pPlayerinfobuffer[], szNewModel[])
{
    new 
iArrayIndex get_user_model_by_flag(get_user_flags(pPlayer))

    if(!
IsValidArrayIndex(iArrayIndex))
        return 
HC_CONTINUE
    
    
switch(get_member(pPlayerm_iTeam))
    {
        case 
TEAM_TERRORIST: {
        
#if defined SET_MODELINDEX
            
set_member(pPlayerm_modelIndexPlayerg_iTTModelIndex[iArrayIndex])
        
#endif
            
SetHookChainArg(3ATYPE_STRINGg_eModelsData[iArrayIndex][szTTModel])
        }
        case 
TEAM_CT: {
        
#if defined SET_MODELINDEX
            
set_member(pPlayerm_modelIndexPlayerg_iCTModelIndex[iArrayIndex])
        
#endif
            
SetHookChainArg(3ATYPE_STRINGg_eModelsData[iArrayIndex][szCTModel])
        }
        default: return 
HC_CONTINUE
    
}

    return 
HC_CONTINUE
}


get_user_model_by_flag(const iUserFlags)
{
    const 
INVALID_INDEX = -1

    
for(new 0sizeof(g_eModelsData)-1i++)
    {
        if(
iUserFlags g_eModelsData[i][iFlag] || g_eModelsData[i][iFlag] == ADMIN_ALL)
            return 
i
    
}

    return 
INVALID_INDEX // non admin player
}

precache_player_model(const szModel[])
{    
    new 
szFileToPrecache[MAX_MODEL_PATH_LEN], szErrMsg[MAX_MODEL_PATH_LEN 64]

    
formatex(szFileToPrecachecharsmax(szFileToPrecache), "models/player/%s/%s.mdl"szModelszModel)

    if(!
file_exists(szFileToPrecache))
    {
        
formatex(szErrMsgcharsmax(szErrMsg), "[Admin Models] ERROR: Model ^"%s^" not found!"szFileToPrecache)
        
set_fail_state(szErrMsg)
        return 
0
    
}

    return 
precache_model(szFileToPrecache)

tarsisd2 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-05-2018 , 03:20   Re: ReAPI natives?
Reply With Quote #9

And what is the advantage in using reapi for player models, knowing that if you used fakemeta the plugin would work in both rehlds and hlds, while with reapi it works only in rehlds?
__________________
HamletEagle is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 01-05-2018 , 05:55   Re: ReAPI natives?
Reply With Quote #10

Quote:
Originally Posted by tarsisd2 View Post
reapi admin models has been done, look at this code

PHP Code:
#include <amxmodx>
#include <reapi>

enum player_models szTTModel[64], szCTModel[64], iFlag }


/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG START ■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

#define SET_MODELINDEX
#define MAX_MODEL_PATH_LEN     128

/// FORMAT: "Terrorist Model" "Counter-Terrorist Model"  "Access Flag" 

new const g_eModelsData[][player_models] = 
{
    { 
"snowleet""lolgign"ADMIN_LEVEL_B },
    { 
"viptt""vipct"ADMIN_LEVEL_H },
    { 
"bomjtt""bomjct"ADMIN_ALL },
    

/**■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ CONFIG END ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/

    
{"""", -1// don't touch it!! 
}

#define IsValidArrayIndex(%1)         (0 <= %1 <= sizeof(g_eModelsData)-1)

#if defined SET_MODELINDEX
    
new g_iTTModelIndex[sizeof(g_eModelsData)], g_iCTModelIndex[sizeof(g_eModelsData)]
#endif


public plugin_precache()
{
    if(
g_eModelsData[0][iFlag] == -1)
    {
        
set_fail_state("Array g_eModelsData are empty!")
        return
    }

    for(new 
0sizeof(g_eModelsData)-1i++)
    {
    
#if defined SET_MODELINDEX
        
g_iTTModelIndex[i] = precache_player_model(g_eModelsData[i][szTTModel])
        
g_iCTModelIndex[i] = precache_player_model(g_eModelsData[i][szCTModel])
    
#else
        
precache_player_model(g_eModelsData[i][szTTModel])
        
precache_player_model(g_eModelsData[i][szCTModel])
    
#endif
    
}
}

public 
plugin_init()
{
    
register_plugin("[ReAPI] Admin Models""0.0.2""Vaqtincha")

    
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoModel"SetClientUserInfoModel", .post false)
}


public 
SetClientUserInfoModel(const pPlayerinfobuffer[], szNewModel[])
{
    new 
iArrayIndex get_user_model_by_flag(get_user_flags(pPlayer))

    if(!
IsValidArrayIndex(iArrayIndex))
        return 
HC_CONTINUE
    
    
switch(get_member(pPlayerm_iTeam))
    {
        case 
TEAM_TERRORIST: {
        
#if defined SET_MODELINDEX
            
set_member(pPlayerm_modelIndexPlayerg_iTTModelIndex[iArrayIndex])
        
#endif
            
SetHookChainArg(3ATYPE_STRINGg_eModelsData[iArrayIndex][szTTModel])
        }
        case 
TEAM_CT: {
        
#if defined SET_MODELINDEX
            
set_member(pPlayerm_modelIndexPlayerg_iCTModelIndex[iArrayIndex])
        
#endif
            
SetHookChainArg(3ATYPE_STRINGg_eModelsData[iArrayIndex][szCTModel])
        }
        default: return 
HC_CONTINUE
    
}

    return 
HC_CONTINUE
}


get_user_model_by_flag(const iUserFlags)
{
    const 
INVALID_INDEX = -1

    
for(new 0sizeof(g_eModelsData)-1i++)
    {
        if(
iUserFlags g_eModelsData[i][iFlag] || g_eModelsData[i][iFlag] == ADMIN_ALL)
            return 
i
    
}

    return 
INVALID_INDEX // non admin player
}

precache_player_model(const szModel[])
{    
    new 
szFileToPrecache[MAX_MODEL_PATH_LEN], szErrMsg[MAX_MODEL_PATH_LEN 64]

    
formatex(szFileToPrecachecharsmax(szFileToPrecache), "models/player/%s/%s.mdl"szModelszModel)

    if(!
file_exists(szFileToPrecache))
    {
        
formatex(szErrMsgcharsmax(szErrMsg), "[Admin Models] ERROR: Model ^"%s^" not found!"szFileToPrecache)
        
set_fail_state(szErrMsg)
        return 
0
    
}

    return 
precache_model(szFileToPrecache)

damn... by the way it nicely codded
Quote:
Originally Posted by HamletEagle View Post
And what is the advantage in using reapi for player models, knowing that if you used fakemeta the plugin would work in both rehlds and hlds, while with reapi it works only in rehlds?
any sugestion from you? i highly recommended using rehlds, because it bug fixes and it prevent from exploit at all and have a great anti cheats and easy making plugins for it, so give me some ideas
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
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 14:17.


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