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

Subplugin Submission [ZP] Extra Item: CSO REX CV-47 60R


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 00:50   [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #1

"[ZP] Extra Item: CSO REX CV-47 60R"

Description:
"A New Item For Zombie Plague Mod, this is the CSO REX Corp.'s Prototype Ak-47"

"The CV-47 60R"

Custom Functions:
1. "Added Zoom like the Original CSO"
2. "Edited Clip and BP Ammo"
3. "Doesn't Collide with Other Ak-47 Plugins"
4. "Added CSO CV-47 v_, p_, w_models"
5. "Custom Firing Sounds"
6. "Added Damage Multiplier"

Credits:
jc980 - models, sounds, testing.
JeproKs Production Team - Scripting.
Scripting Help Sub-Forum - For helping us fix problems and compile errors.
Scripting Tutorial Sub-Forum - For helping my Team learn about Scripting.


Instructions:
1. "Extract ZIP file to desktop."
2. " Place Resources to designated Folder - cstrike/models/zombie_plague |for sound - cstrike/sound/zombie_plague."
3. "place .sma file to scripting folder at cstrike/addons/amxmodx | for the .amxx file, place to cstrike/addons/plugins."
4. "edit plugins-zplague file at cstrike/addons/configs add this zp_cso_cv47.amxx then save."
5. "go have fun and GO PWN NOOB ZOMBIES!"
Attached Files
File Type: zip zp_cso_cv47_resources.zip (466.5 KB, 1674 views)
File Type: sma Get Plugin or Get Source (zp_cso_cv47.sma - 2211 views - 6.1 KB)
__________________

Last edited by jc980; 05-06-2010 at 02:43.
jc980 is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 00:53   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #2

Sorry For Making It Admin Commands!!!!! I did not see it!!!!!
__________________
jc980 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-05-2010 , 00:54   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #3

You can edit your first post and "Go Advanced" to change the type and mod settings!!!!!
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 00:57   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
You can edit your first post and "Go Advanced" to change the type and mod settings!!!!!
thank you!
__________________
jc980 is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-05-2010 , 01:07   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #5

Shouldn't this be posted in the ZP section?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2010 , 01:07   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #6

Not implemented callbacks
FM_EmitSound to attempt to catch the fire sound (callback has even not the same name in declaration line and in implementation func)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 01:10   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Not implemented callbacks
FM_EmitSound to attempt to catch the fire sound (callback has even not the same name in declaration line and in implementation func)
what? let me check that again.
__________________
jc980 is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 01:11   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #8

Quote:
Originally Posted by wrecked_ View Post
Shouldn't this be posted in the ZP section?
Quote:
Originally Posted by jc980 View Post
what? let me check that again.
is was supposed to approved before moving to zp forum.
__________________
jc980 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2010 , 01:16   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #9

Quote:
Originally Posted by jc980 View Post
what? let me check that again.
You are supposed to check before release ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-05-2010 , 01:56   Re: [ZP] Extra Item: CSO REX CV-47 60R
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
You are supposed to check before release ;)
well, the first time i tried it worked properly.
but, when i tried again and restarted server it moved back to regular ak-47 and reload gave back 30 instead of 60????? when its out of ammo it goes back to 90 when i buy????? what the hell??!?!

ok, i tried to change stuff in the .sma :
PHP Code:
// [ZP] Extra Item: CSO REX CV-47 60R
// By jc980 and the JeproKs Productions Team

#include <amxmodx>
#include <engine>    
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>

#define is_valid_player(%1) (1 <= %1 <= 32)
#define ENG_NULLENT        -1    
#define EV_INT_WEAPONKEY    EV_INT_impulse    
#define CV_WEAPONKEY    666
#define FIRE_CV47 "sound/zombie_plague/cv47-1.wav"

new const g_CVEnt[] = "weapon_ak47"

// cvar crap
new cvar_dmgmultipliercvar_custommodel

// Item ID
new g_itemid

new bool:g_HasAk[33]

new 
g_hasZoom33 ]

const 
weap_ak47 = ((1<<CSW_AK47))

public 
plugin_init()
{
    
    
// fucking CVARs
    
cvar_dmgmultiplier register_cvar("zp_cv47_dmg_multiplier""5")
    
cvar_custommodel register_cvar("zp_cv47_custom_model""1")
    
    
// Register The Fucking Plugin
    
register_plugin("[ZP] Extra Item: CSO REX CV-47 60R""1.0""jc980")
    
// Register Zombie Plague 4.3 extra shit item
    
g_itemid zp_register_extra_item("CSO REX CV-47 60R"10ZP_TEAM_HUMAN)
    
// Death Message shit
    
register_event("DeathMsg""Death""a")
    
// Weapon Pick Up thing
    
register_event("WeapPickup","checkModel","b","1=19")
    
// Current Weapon Event bla bla bla
    
register_event("CurWeapon","checkWeapon","be","1=1")
    
// Ham TakeDamage stuff
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_forwardFM_CmdStart"fw_CmdStart" )
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
RegisterHam(Ham_Item_AddToPlayerg_CVEnt"fw_CV47AddToPlayer")
    
// world model shit
    
register_forward(FM_SetModel"fw_SetModel")
    
// custom sound shit
    
register_forward(FM_EmitSound,"fw_emitsound")
}

public 
client_connect(id)
{
    
g_HasAk[id] = false
}

public 
client_disconnect(id)
{
    
g_HasAk[id] = false
}

public 
Death()
{
    
g_HasAk[read_data(2)] = false
}

public 
fwHamPlayerSpawnPost(id)
{
    
g_HasAk[id] = false
}

public 
plugin_precache()
{
    
precache_model("models/zombie_plague/v_cv47.mdl")
    
precache_model("models/zombie_plague/p_cv47.mdl")
    
precache_model("models/zombie_plague/w_cv47.mdl")    
    
precache_sound("weapons/zoom.wav")
    
precache_sound(FIRE_CV47)
}

public 
zp_user_infected_post(id)
{
    if (
zp_get_user_zombie(id))
    {
        
g_HasAk[id] = false
    
}
}

public 
checkModel(id)
{
    if ( 
zp_get_user_zombie(id) )
        return 
PLUGIN_HANDLED
    
    
new szWeapID read_data(2)
    
    if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        
set_pev(idpev_viewmodel2"models/zombie_plague/v_cv47.mdl")
        
set_pev(idpev_weaponmodel2"models/zombie_plague/p_cv47.mdl")
    }
    return 
PLUGIN_HANDLED
}

public 
fw_SetModel(entitymodel[])
{
    
// check if its a valid entity or else we'll get shitty errors
    
if(!is_valid_ent(entity)) 
        return 
FMRES_IGNORED
    
    
// checks if it's the crappy model we want to change
    
if(!equali(model"w_ak47.mdl")) 
        return 
FMRES_IGNORED
    
    
new className[33]
    
entity_get_string(entityEV_SZ_classnameclassName32)
    
    
// world model crap
    
if(equal(className"weaponbox"))
    {
        
// set's the world model (what you see on the shitty ground)
        
entity_set_model(entity"models/zombie_plague/w_cv47.mdl")
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_dmgmultiplier ) )
    }
}

public 
fw_CmdStartiduc_handleseed )
{
    if( !
is_user_aliveid ) ) 
        return 
PLUGIN_HANDLED
    
    
if( ( get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new 
szClipszAmmo
        
new szWeapID get_user_weaponidszClipszAmmo )
        
        if( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            
g_hasZoom[id] = true
            cs_set_user_zoom
idCS_SET_AUGSG552_ZOOM)
            
emit_soundidCHAN_ITEM"weapons/zoom.wav"0.202.400100 )
        }
        
        else if ( 
szWeapID == CSW_AK47 && g_HasAk[id] == true && g_hasZoom[id])
        {
            
g_hasZoomid ] = false
            cs_set_user_zoom
idCS_RESET_ZOOM)
            
        }
        
    }
    return 
PLUGIN_HANDLED
}

public 
fw_emitsoundound(entity,channel,sample[],Float:volume,Float:attenuation,fFlags,pitch) {
    
    
// if it is our extra shit item firing sound
    
if(equali(sample,"sound/weapons/ak47-1.wav")) 
    {
        
emit_sound(entity,channel,FIRE_CV47,volume,attenuation,fFlags,pitch); // play our custom one
        
return FMRES_SUPERCEDE// stop this original from playing
    
}
    
    return 
FMRES_IGNORED;
}

public 
zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    {
        if ( 
user_has_weapon(playerCSW_AK47) )
        {
            
drop_prim(player)
        }
        
        
// bpammo and weapon clip shit
        
new iWep give_item(player"weapon_ak47")
        if( 
iWep )
        {
            
cs_set_weapon_ammoiWep60 )
            
cs_set_user_bpammoplayerCSW_AK47180 )
        }
        
client_print(playerprint_chat"[ZP] You bought CSO REX CV-47 60R")
        
g_HasAk[player] = true;
    }
}


// More scripting Shit (thanks to the scripting help forums)
public fw_CV47AddToPlayer (CV47id)
{
    
// Make sure that this is M79 (making it dont collide to Nihilanth's m79 plugin)
    
if( is_valid_ent(CV47) && is_user_connected(id) && entity_get_int(CV47EV_INT_WEAPONKEY) == CV_WEAPONKEY)
    {
        
// Update shit
        
g_HasAk[id] = true
        
        
// Reset weapon bullshit
        
entity_set_int(CV47EV_INT_WEAPONKEY0)
        
        return 
HAM_HANDLED
    
}
    
    return 
HAM_IGNORED
}

stock drop_prim(id
{
    new 
weapons[32], num
    get_user_weapons
(idweaponsnum)
    for (new 
0numi++) {
        if (
weap_ak47 & (1<<weapons[i])) 
        {
            static 
wname[32]
            
get_weaponname(weapons[i], wnamesizeof wname 1)
            
engclient_cmd(id"drop"wname)
        }
    }

please stand by, fixing wrong code. (please do not delete thread)
__________________

Last edited by jc980; 05-05-2010 at 04:54.
jc980 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 05:49.


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