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

[CS:GO] Arms for Z:R


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
extr1m725
Member
Join Date: Oct 2014
Old 03-22-2015 , 14:26   [CS:GO] Arms for Z:R
Reply With Quote #1

We have to make this plugin work on Z:R. It works fine with standard/common commands, but if you give it to zombies, it doesn't work!

PHP Code:
#pragma semicolon 1 

#include <sourcemod> 
#include <sdktools> 
#include <zombiereloaded>

new Handle:g_CvarModel
new 
String:g_Model[PLATFORM_MAX_PATH]; 

public 
OnPluginStart() 

    
g_CvarModel CreateConVar("sm_zombie_arms""/models/player/colateam/zombie1/arms.mdl""The path to the model for the hands of zombies."); 
    
GetConVarString(g_CvarModelg_Modelsizeof(g_Model)); 

    
HookEvent("player_spawn"Player_Spawn); 


public 
OnMapStart() 

    
AddFileToDownloadsTable(g_Model); 

    if(!
StrEqual(g_Model"")) 
    { 
        
PrecacheModel(g_Modeltrue); 
    } 


public 
Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast

    new 
client GetClientOfUserId(GetEventInt(event"userid")); 

    if(
ZR_IsClientZombie(client) && IsClientInGame(client) && !StrEqual(g_Model"")) SetEntPropString(clientProp_Send"m_szArmsModel"g_Model); 

extr1m725 is offline
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 03-23-2015 , 11:16   Re: [CS:GO] Arms for Z:R
Reply With Quote #2

EDIT: I found this plugin on pastebin.com via google, there was no author info. It looks like a modified version of franciscos plugin, you can find it here: https://forums.alliedmods.net/showthread.php?t=260331

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <zombiereloaded>
#include <cstrike>

new String:g_sArmsModel[MAXPLAYERS+1][128];

public 
OnPluginStart() 
{
    
HookEvent("item_pickup"Event_ItemPickup);
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
    
HookEvent("round_start"Event_RoundStatusChange);
    
HookEvent("round_end"Event_RoundStatusChange);
    
    for(new 
1<= MaxClientsi++)
        if(
IsClientInGame(i)) 
            
OnClientPutInServer(i);
}

public 
OnClientPutInServer(client)
    
ResetStoredArmsModel(client);

public 
OnMapStart()
    
CacheAndDownload();

public 
Action:Event_ItemPickup(Handle:event, const String:name[], bool:dontBroadcast
{
    
decl String:sWeapon[64];
    
GetEventString(event"item"sWeaponsizeof(sWeapon));
    if (
StrEqual(sWeapon"knife"false)) 
    {
        new 
client GetClientOfUserId(GetEventInt(event"userid"));
        
        new 
iWeapon GetPlayerWeaponSlot(clientCS_SLOT_KNIFE);
        if (
iWeapon != -1
        {
            if(
ZR_IsClientZombie(client)) 
                
SetZombieArmsModel(client);
            else 
RestoreArmsModel(client);
        }
    }

    return 
Plugin_Continue;


public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
ZR_IsClientHuman(client))
        
StoreArmsModel(client);
}

public 
Action:Event_RoundStatusChange(Handle:event, const String:name[], bool:dontBroadcast)
{
    for (new 
1MaxClientsi++)
    {
        if(!
IsClientInGame(i) || !IsPlayerAlive(i))
            continue;
            
        
RestoreArmsModel(i);
        
        if(
GetClientTeam(i) == CS_TEAM_T)
        {
            
CS_SwitchTeam(iCS_TEAM_CT);
            
CS_SwitchTeam(iCS_TEAM_T);
        }
    }
}

CacheAndDownload()
{
    
PrecacheModel("models/weapons/ct_arms_gign.mdl");
    
PrecacheModel("models/player/colateam/zombie1/arms.mdl");
    
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.dx90.vtx");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.mdl");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.vvd");
    
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body_bump.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vtf");
}

SetZombieArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel""models/player/colateam/zombie1/arms.mdl");

StoreArmsModel(client)
    
GetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client], 128);

RestoreArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client]);

ResetStoredArmsModel(client)
    
Format(g_sArmsModel[client], 128"models/weapons/ct_arms_gign.mdl"); 

Last edited by m_bNightstalker; 03-24-2015 at 13:41.
m_bNightstalker is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-23-2015 , 16:24   Re: [CS:GO] Arms for Z:R
Reply With Quote #3

Quote:
Originally Posted by m_bNightstalker View Post
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <zombiereloaded>
#include <cstrike>

new String:g_sArmsModel[MAXPLAYERS+1][128];

public 
OnPluginStart() 
{
    
HookEvent("item_pickup"Event_ItemPickup);
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
    
HookEvent("round_start"Event_RoundStatusChange);
    
HookEvent("round_end"Event_RoundStatusChange);
    
    for(new 
1<= MaxClientsi++)
        if(
IsClientInGame(i)) 
            
OnClientPutInServer(i);
}

public 
OnClientPutInServer(client)
    
ResetStoredArmsModel(client);

public 
OnMapStart()
    
CacheAndDownload();

public 
Action:Event_ItemPickup(Handle:event, const String:name[], bool:dontBroadcast
{
    
decl String:sWeapon[64];
    
GetEventString(event"item"sWeaponsizeof(sWeapon));
    if (
StrEqual(sWeapon"knife"false)) 
    {
        new 
client GetClientOfUserId(GetEventInt(event"userid"));
        
        new 
iWeapon GetPlayerWeaponSlot(clientCS_SLOT_KNIFE);
        if (
iWeapon != -1
        {
            if(
ZR_IsClientZombie(client)) 
                
SetZombieArmsModel(client);
            else 
RestoreArmsModel(client);
        }
    }

    return 
Plugin_Continue;


public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
ZR_IsClientHuman(client))
        
StoreArmsModel(client);
}

public 
Action:Event_RoundStatusChange(Handle:event, const String:name[], bool:dontBroadcast)
{
    for (new 
1MaxClientsi++)
    {
        if(!
IsClientInGame(i) || !IsPlayerAlive(i))
            continue;
            
        
RestoreArmsModel(i);
        
        if(
GetClientTeam(i) == CS_TEAM_T)
        {
            
CS_SwitchTeam(iCS_TEAM_CT);
            
CS_SwitchTeam(iCS_TEAM_T);
        }
    }
}

CacheAndDownload()
{
    
PrecacheModel("models/weapons/ct_arms_gign.mdl");
    
PrecacheModel("models/player/colateam/zombie1/arms.mdl");
    
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.dx90.vtx");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.mdl");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.vvd");
    
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body_bump.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vtf");
}

SetZombieArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel""models/player/colateam/zombie1/arms.mdl");

StoreArmsModel(client)
    
GetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client], 128);

RestoreArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client]);

ResetStoredArmsModel(client)
    
Format(g_sArmsModel[client], 128"models/weapons/ct_arms_gign.mdl"); 

This seem exactly like my zr zombie arms plugin. Have different names in the source code and was added unnecessary code but have the same functions that my plugin. You were aware of this? Because seeing this, you seem to be a "plugin's leaker" and also my credits have been deleted... OMG. And if you are aware of this, You can give a coherent and mature explanation of why you do these disrespectful acts against the plugin authors?


EDIT: ok, seems that my plugin was leaked a time ago
__________________
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.


Last edited by Franc1sco; 03-24-2015 at 18:12.
Franc1sco is offline
Send a message via MSN to Franc1sco
extr1m725
Member
Join Date: Oct 2014
Old 03-24-2015 , 08:53   Re: [CS:GO] Arms for Z:R
Reply With Quote #4

Quote:
Originally Posted by m_bNightstalker View Post
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <zombiereloaded>
#include <cstrike>

new String:g_sArmsModel[MAXPLAYERS+1][128];

public 
OnPluginStart() 
{
    
HookEvent("item_pickup"Event_ItemPickup);
    
HookEvent("player_spawn"Event_PlayerSpawn);
    
    
HookEvent("round_start"Event_RoundStatusChange);
    
HookEvent("round_end"Event_RoundStatusChange);
    
    for(new 
1<= MaxClientsi++)
        if(
IsClientInGame(i)) 
            
OnClientPutInServer(i);
}

public 
OnClientPutInServer(client)
    
ResetStoredArmsModel(client);

public 
OnMapStart()
    
CacheAndDownload();

public 
Action:Event_ItemPickup(Handle:event, const String:name[], bool:dontBroadcast
{
    
decl String:sWeapon[64];
    
GetEventString(event"item"sWeaponsizeof(sWeapon));
    if (
StrEqual(sWeapon"knife"false)) 
    {
        new 
client GetClientOfUserId(GetEventInt(event"userid"));
        
        new 
iWeapon GetPlayerWeaponSlot(clientCS_SLOT_KNIFE);
        if (
iWeapon != -1
        {
            if(
ZR_IsClientZombie(client)) 
                
SetZombieArmsModel(client);
            else 
RestoreArmsModel(client);
        }
    }

    return 
Plugin_Continue;


public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
ZR_IsClientHuman(client))
        
StoreArmsModel(client);
}

public 
Action:Event_RoundStatusChange(Handle:event, const String:name[], bool:dontBroadcast)
{
    for (new 
1MaxClientsi++)
    {
        if(!
IsClientInGame(i) || !IsPlayerAlive(i))
            continue;
            
        
RestoreArmsModel(i);
        
        if(
GetClientTeam(i) == CS_TEAM_T)
        {
            
CS_SwitchTeam(iCS_TEAM_CT);
            
CS_SwitchTeam(iCS_TEAM_T);
        }
    }
}

CacheAndDownload()
{
    
PrecacheModel("models/weapons/ct_arms_gign.mdl");
    
PrecacheModel("models/player/colateam/zombie1/arms.mdl");
    
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.dx90.vtx");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.mdl");
    
AddFileToDownloadsTable("models/player/colateam/zombie1/arms.vvd");
    
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_body_bump.vtf");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vmt");
    
AddFileToDownloadsTable("materials/models/player/colateam/zombie1/slow_pants.vtf");
}

SetZombieArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel""models/player/colateam/zombie1/arms.mdl");

StoreArmsModel(client)
    
GetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client], 128);

RestoreArmsModel(client)
    
SetEntPropString(clientProp_Send"m_szArmsModel"g_sArmsModel[client]);

ResetStoredArmsModel(client)
    
Format(g_sArmsModel[client], 128"models/weapons/ct_arms_gign.mdl"); 
Thank You for solving the problem. I think, every Z:R server administrator will thank You.
extr1m725 is offline
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 13:00.


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