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

i want this plugin (without zr)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
generals
Senior Member
Join Date: Aug 2018
Old 02-14-2019 , 02:40   i want this plugin (without zr)
Reply With Quote #1

hi guys

someone can edit this plugin? i want use this plugins without zr (css)

I want to use plugins like this:
https://forums.alliedmods.net/showthread.php?t=205074

create 1 cfg file in configs .. zombie_claws.like this:

"t_claws_path" "models.mdl here"
"ct_claws_path" "models.mdl here"

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <zr_tools>

#define EF_NODRAW 32

new Handle:g_hCreateViewModel;

new 
Handle:g_hEnable;
new 
Handle:g_hDownListPath;

new 
bool:g_bEnable;

new 
String:g_sDownListPath[PLATFORM_MAX_PATH];

new 
g_iOffset_Effects;

new 
g_iOffset_ViewModel;
new 
g_iOffset_ActiveWeapon;

new 
g_iOffset_Weapon;
new 
g_iOffset_Sequence;
new 
g_iOffset_ModelIndex;
new 
g_iOffset_PlaybackRate;

new 
g_iViewModels[MAXPLAYERS+1][2];

public 
OnPluginStart()
{
    new 
Handle:gameConf LoadGameConfigFile("plugin.viewmodel");
    
    if (!
gameConf)
    {
        
SetFailState("Fatal Error: Unable to open game config file: \"plugin.viewmodel\"!");
    }
    
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(gameConfSDKConf_Virtual"CreateViewModel");
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_ByValue);
    
    if ((
g_hCreateViewModel EndPrepSDKCall()) == INVALID_HANDLE)
    {
        
SetFailState("Fatal Error: Unable to create SDK call \"CreateViewModel\"!");
    }
    
    
CloseHandle(gameConf);
    
    
CreateConVar("zr_zombieclaws_version"PLUGIN_VERSION"Version of the plugin"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
    
    
g_hEnable CreateConVar("zr_zombieclaws_enable""1""Enables/Disables the plugin"FCVAR_PLUGINtrue0.0true1.0);
    
g_hDownListPath CreateConVar("zr_zombieclaws_downloadpath""addons/sourcemod/data/downlist_zrclaws.ini""Path to the download list of zombie claws"FCVAR_PLUGIN);
    
    
HookConVarChange(g_hEnableOnConVarChanged);
    
HookConVarChange(g_hDownListPathOnConVarChanged);
    
    
g_bEnable GetConVarBool(g_hEnable);
    
GetConVarString(g_hDownListPathg_sDownListPathsizeof(g_sDownListPath));
    
    
File_ReadDownloadList(g_sDownListPath);
    
    
g_iOffset_Effects        GetSendPropOffset("CBaseEntity""m_fEffects");
    
g_iOffset_ViewModel      GetSendPropOffset("CBasePlayer""m_hViewModel");
    
g_iOffset_ActiveWeapon   GetSendPropOffset("CBasePlayer""m_hActiveWeapon");
    
    
g_iOffset_Weapon         GetSendPropOffset("CBaseViewModel""m_hWeapon");
    
g_iOffset_Sequence       GetSendPropOffset("CBaseViewModel""m_nSequence");
    
g_iOffset_ModelIndex     GetSendPropOffset("CBaseViewModel""m_nModelIndex");
    
g_iOffset_PlaybackRate   GetSendPropOffset("CBaseViewModel""m_flPlaybackRate");
    
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
    
AutoExecConfig(true"zombiereloaded/zombie_claws");
}

public 
OnConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[])
{
    if (
convar == g_hEnable)
    {
        
g_bEnable bool:StringToInt(newValue);
    }
    else if(
convar == g_hDownListPath)
    {
        
Format(g_sDownListPathsizeof(g_sDownListPath), "%s"newValue);
    }
}

GetSendPropOffset(const String:serverClass[], const String:propName[])
{
    new 
offset FindSendPropOffs(serverClasspropName);

    if (!
offset)
    {
        
SetFailState("Fatal Error: Unable to find offset: \"%s::%s\"!"serverClasspropName);
    }

    return 
offset;
}

public 
OnClientPostAdminCheck(client)
{
    if (
g_bEnable)
    {
        
g_iViewModels[client][0] = -1;
        
g_iViewModels[client][1] = -1;

        
SDKHook(clientSDKHook_PostThinkOnClientThinkPost);
    }
}

public 
OnClientThinkPost(client)
{
    static 
currentWeapon[MAXPLAYERS 1];
    static 
OldSequence[MAXPLAYERS 1];
    static 
Float:OldCycle[MAXPLAYERS 1];    
    
    new 
viewModel1 g_iViewModels[client][0];
    new 
viewModel2 g_iViewModels[client][1];
    
    if (!
IsPlayerAlive(client))
    {
        if (
viewModel2 != -1)
        {
            
ShowViewModel(viewModel2false);
            
            
g_iViewModels[client][0] = -1;
            
g_iViewModels[client][1] = -1;
            
            
currentWeapon[client] = 0;
        }
        
        return;
    }
    
    new 
activeWeapon GetEntDataEnt2(clientg_iOffset_ActiveWeapon);
    new 
Sequence GetEntProp(viewModel1Prop_Send"m_nSequence");
    new 
Float:Cycle GetEntPropFloat(viewModel1Prop_Data"m_flCycle");    
    
    if (
IsValidEdict(activeWeapon))
    {
        if (
activeWeapon != currentWeapon[client])
        {
            if (
currentWeapon[client])
            {
                
ShowViewModel(viewModel2false);
            }
            
            
currentWeapon[client] = 0;
            
            
decl String:className[32];
            
GetEdictClassname(activeWeaponclassNamesizeof(className));
            
            if (
StrEqual(className"weapon_knife"))
            {    
                
decl String:Model[256];
                
ZRT_GetClientAttributeString(client"claws_path"Modelsizeof(Model), "models/weapons/v_knife_t.mdl");
                
                if (!
StrEqual(Model"models/weapons/v_knife_t.mdl"false))
                {        
                    
ShowViewModel(viewModel1false);
                    
                    
ShowViewModel(viewModel2true);
                    
                    new 
index PrecacheModel(Model);
                    
                    
SetEntData(viewModel2g_iOffset_ModelIndexindex_true);
                    
SetEntData(viewModel2g_iOffset_WeaponGetEntData(viewModel1g_iOffset_Weapon), _true);
                    
                    
currentWeapon[client] = activeWeapon;
                }
            }
        }
    }
    
    if (
currentWeapon[client])
    {    
        
SetEntData(viewModel2g_iOffset_SequenceGetEntData(viewModel1g_iOffset_Sequence), _true);
        
SetEntData(viewModel2g_iOffset_PlaybackRateGetEntData(viewModel1g_iOffset_PlaybackRate), _true);
        
        if ((
Cycle OldCycle[client]) && (Sequence == OldSequence[client]))
        {
            
SetEntProp(viewModel2Prop_Send"m_nSequence"0);
        }
    }
    
    
OldSequence[client] = Sequence;
    
OldCycle[client] = Cycle;    
}

ShowViewModel(viewModelbool:show)
{
    new 
flags GetEntData(viewModelg_iOffset_Effects);
    
    
SetEntData(viewModelg_iOffset_Effectsshow flags & ~EF_NODRAW flags EF_NODRAW_true);
}

public 
Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBrodcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if (
GetClientTeam(client) > 1)
    {
        
SDKCall(g_hCreateViewModelclient1);
        
        
g_iViewModels[client][0] = GetViewModel(client0);
        
g_iViewModels[client][1] = GetViewModel(client1);
    }
}

GetViewModel(clientindex)
{
    return 
GetEntDataEnt2(clientg_iOffset_ViewModel + (index 4));
}

new 
String:_smlib_empty_twodimstring_array[][] = { { '\0' } };
stock File_AddToDownloadsTable(const String:path[], bool:recursive=true, const String:ignoreExts[][]=_smlib_empty_twodimstring_arraysize=0)
{
    if (
path[0] == '\0') {
        return;
    }

    if (
FileExists(path)) {
        
        new 
String:fileExtension[4];
        
File_GetExtension(pathfileExtensionsizeof(fileExtension));
        
        if (
StrEqual(fileExtension"bz2"false) || StrEqual(fileExtension"ztmp"false)) {
            return;
        }
        
        if (
Array_FindString(ignoreExtssizefileExtension) != -1) {
            return;
        }

        
AddFileToDownloadsTable(path);
    }
    else if (
recursive && DirExists(path)) {

        
decl String:dirEntry[PLATFORM_MAX_PATH];
        new 
Handle:__dir OpenDirectory(path);

        while (
ReadDirEntry(__dirdirEntrysizeof(dirEntry))) {

            if (
StrEqual(dirEntry".") || StrEqual(dirEntry"..")) {
                continue;
            }
            
            
Format(dirEntrysizeof(dirEntry), "%s/%s"pathdirEntry);
            
File_AddToDownloadsTable(dirEntryrecursiveignoreExtssize);
        }
        
        
CloseHandle(__dir);
    }
    else if (
FindCharInString(path'*'true)) {
        
        new 
String:fileExtension[4];
        
File_GetExtension(pathfileExtensionsizeof(fileExtension));

        if (
StrEqual(fileExtension"*")) {

            
decl
                String
:dirName[PLATFORM_MAX_PATH],
                
String:fileName[PLATFORM_MAX_PATH],
                
String:dirEntry[PLATFORM_MAX_PATH];

            
File_GetDirName(pathdirNamesizeof(dirName));
            
File_GetFileName(pathfileNamesizeof(fileName));
            
StrCat(fileNamesizeof(fileName), ".");

            new 
Handle:__dir OpenDirectory(dirName);
            while (
ReadDirEntry(__dirdirEntrysizeof(dirEntry))) {

                if (
StrEqual(dirEntry".") || StrEqual(dirEntry"..")) {
                    continue;
                }

                if (
strncmp(dirEntryfileNamestrlen(fileName)) == 0) {
                    
Format(dirEntrysizeof(dirEntry), "%s/%s"dirNamedirEntry);
                    
File_AddToDownloadsTable(dirEntryrecursiveignoreExtssize);
                }
            }

            
CloseHandle(__dir);
        }
    }

    return;
}

stock File_ReadDownloadList(const String:path[])
{
    new 
Handle:file OpenFile(path"r");
    
    if (
file  == INVALID_HANDLE) {
        return;
    }

    new 
String:buffer[PLATFORM_MAX_PATH];
    while (!
IsEndOfFile(file)) {
        
ReadFileLine(filebuffersizeof(buffer));
        
        new 
pos;
        
pos StrContains(buffer"//");
        if (
pos != -1) {
            
buffer[pos] = '\0';
        }
        
        
pos StrContains(buffer"#");
        if (
pos != -1) {
            
buffer[pos] = '\0';
        }

        
pos StrContains(buffer";");
        if (
pos != -1) {
            
buffer[pos] = '\0';
        }
        
        
TrimString(buffer);
        
        if (
buffer[0] == '\0') {
            continue;
        }

        
File_AddToDownloadsTable(buffer);
    }

    
CloseHandle(file);
}

stock File_GetExtension(const String:path[], String:buffer[], size)
{
    new 
extpos FindCharInString(path'.'true);
    
    if (
extpos == -1)
    {
        
buffer[0] = '\0';
        return;
    }

    
strcopy(buffersizepath[++extpos]);
}

stock Array_FindString(const String:array[][], size, const String:str[], bool:caseSensitive=truestart=0)
{
    if (
start 0) {
        
start 0;
    }

    for (new 
i=startsizei++) {

        if (
StrEqual(array[i], strcaseSensitive)) {
            return 
i;
        }
    }
    
    return -
1;
}

stock bool:File_GetFileName(const String:path[], String:buffer[], size)
{    
    if (
path[0] == '\0') {
        
buffer[0] = '\0';
        return;
    }
    
    
File_GetBaseName(pathbuffersize);
    
    new 
pos_ext FindCharInString(buffer'.'true);

    if (
pos_ext != -1) {
        
buffer[pos_ext] = '\0';
    }
}

stock bool:File_GetDirName(const String:path[], String:buffer[], size)
{    
    if (
path[0] == '\0') {
        
buffer[0] = '\0';
        return;
    }
    
    new 
pos_start FindCharInString(path'/'true);
    
    if (
pos_start == -1) {
        
pos_start FindCharInString(path'\\'true);
        
        if (
pos_start == -1) {
            
buffer[0] = '\0';
            return;
        }
    }
    
    
strcopy(buffersizepath);
    
buffer[pos_start] = '\0';
}

stock bool:File_GetBaseName(const String:path[], String:buffer[], size)
{    
    if (
path[0] == '\0') {
        
buffer[0] = '\0';
        return;
    }
    
    new 
pos_start FindCharInString(path'/'true);
    
    if (
pos_start == -1) {
        
pos_start FindCharInString(path'\\'true);
    }
    
    
pos_start++;
    
    
strcopy(buffersizepath[pos_start]);


Last edited by generals; 02-14-2019 at 08:46.
generals is offline
LagMyAss
Member
Join Date: Sep 2016
Location: Greece
Old 02-14-2019 , 07:02   Re: i want this plugin (without zr)
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=2277249
__________________
LagMyAss is offline
generals
Senior Member
Join Date: Aug 2018
Old 02-14-2019 , 08:46   Re: i want this plugin (without zr)
Reply With Quote #3

hi

thanks ..but this is for zombie reloaded..i want without zr.. for css
generals is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 02-14-2019 , 17:36   Re: i want this plugin (without zr)
Reply With Quote #4

This dont need zr (just optional) -> https://forums.alliedmods.net/showthread.php?p=2468866
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
generals
Senior Member
Join Date: Aug 2018
Old 02-15-2019 , 03:20   Re: i want this plugin (without zr)
Reply With Quote #5

dont work on css ..this error on console:

PHP Code:
L 02/15/2019 11:54:01: [SMException reportedProperty "m_szArmsModel" not found for entity 1
L 02
/15/2019 11:54:01: [SMBlamingconfigurablearmsmenu.smx
L 02
/15/2019 11:54:01: [SMCall stack trace:
L 02/15/2019 11:54:01: [SM]   [0SetEntPropString
L 02
/15/2019 11:54:01: [SM]   [1Line 589E:\GitHub\Configurable-arms-menu\scripting\configurablearmsmenu.sp::GiveArms
L 02
/15/2019 11:54:01: [SM]   [2Line 403E:\GitHub\Configurable-arms-menu\scripting\configurablearmsmenu.sp::Menu_HandlerTT 
generals is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 02-15-2019 , 10:02   Re: i want this plugin (without zr)
Reply With Quote #6

Plugin title:
[CSGO|Zr]
__________________
NanoC is offline
Send a message via Skype™ to NanoC
generals
Senior Member
Join Date: Aug 2018
Old 02-15-2019 , 10:40   Re: i want this plugin (without zr)
Reply With Quote #7

yes..but load on css...i said in my first post..i want for css..Franc1sco can edit this plugins..his work is good
generals is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 02-15-2019 , 13:04   Re: i want this plugin (without zr)
Reply With Quote #8

This one : https://github.com/Andersso/SM-WeaponModels
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
generals
Senior Member
Join Date: Aug 2018
Old 02-16-2019 , 05:42   Re: i want this plugin (without zr)
Reply With Quote #9

weaponmodels.smx: Error detected in plugin startup (see error logs)

PHP Code:
L 02/16/2019 14:15:38: [SMException reportedFailed to load SDK call "Animating_GetSequenceActivity"!
L 02/16/2019 14:15:38: [SMBlamingweaponmodels.smx
L 02
/16/2019 14:15:38: [SMCall stack trace:
L 02/16/2019 14:15:38: [SM]   [0SetFailState
L 02
/16/2019 14:15:38: [SM]   [1Line 118C:\Users\Joakim\Documents\Git\SM-WeaponModels\scripting\weaponmodels/entitydata.sp::WeaponModels_EntityDataInit
L 02
/16/2019 14:15:38: [SM]   [2Line 189C:\Users\Joakim\Documents\Git\SM-WeaponModels\scripting\weaponmodels.sp::OnPluginStart
L 02
/16/2019 14:15:38: [SMUnable to load plugin "weaponmodels.smx"Error detected in plugin startup (see error logs
generals is offline
Reply


Thread Tools
Display Modes

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 03:16.


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