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

Subplugin Submission [ZP] Extra Item: Golden Ak - 47 v1.1 Fix


Post New Thread Reply   
 
Thread Tools Display Modes
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 05-05-2009 , 08:29   Re: [ZP] Extra Item: Golden Ak - 47 v0.03
Reply With Quote #31

Quote:
Originally Posted by Pach View Post
AlejandroSk,
PHP Code:
Plugin failed to compilePlease try contacting the author.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

/home/groups/alliedmodders/forums/files/4/3/8/2/0/41731.attach(35) : fatal error 100cannot read from file"zombieplague"

Compilation aborted.
1 Error
PHP Code:
//// zp_extra_goldenak.sma
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(126) :
 
warning 203symbol is never used"szAmmo"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(126) :
 
warning 203symbol is never used"szClip"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(155) :
 
warning 203symbol is never used"plrAmmo"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(203) :
 
error 017undefined symbol "clip"
// C:\Temp\Server\cstrike\addons\amxmodx\scripting\zp_extra_goldenak.sma(235) :
 
error 017undefined symbol "clip"
//
// 2 Errors.
// Could not locate output file compiled\zp_extra_goldenak.amx (compile failed)

same problem :S
__________________
alan_el_more is offline
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-05-2009 , 13:29   Re: [ZP] Extra Item: Golden Ak - 47 v0.04
Reply With Quote #32

Please wait me 10 minutes and i update


Edit: Better to delete it , everyone is giving me -karma saying " i dont like it"

Last edited by AlejandroSk; 05-05-2009 at 13:44.
AlejandroSk is offline
Send a message via MSN to AlejandroSk
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-05-2009 , 14:27   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #33

Dont care about karma try to make it better
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-05-2009 , 14:58   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #34

Sorry i prefeer to delete this
as you can see




-.-
AlejandroSk is offline
Send a message via MSN to AlejandroSk
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-05-2009 , 14:59   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #35

Make it better pls, its good to start with, and you gets better experience on scripting if you go on
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-05-2009 , 15:03   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #36

I dont have reason to continue.
I maked this for people to enjoy.
But none like this so what reason i have to continue editing ?
AlejandroSk is offline
Send a message via MSN to AlejandroSk
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-05-2009 , 15:04   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #37

In my opinion, they should see the code before saying bad things, i will help you as good as i can if you keep doing this Its your first plugin, it should be nice, it is, but you dont want to support it..
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-05-2009 , 15:07   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #38

Quote:
Originally Posted by AlejandroSk View Post
But none like this so what reason i have to continue editing ?
AlejandroSk is offline
Send a message via MSN to AlejandroSk
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-05-2009 , 15:09   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #39

I like it, dont be sad, i have tryied to comment a lot of the lines, hope its correct
PHP Code:
/*
[ZP] Extra Item: Golden Ak 47
Team: Humans

Description: This plugin adds a new weapon for Human Teams.
Weapon Cost: 30

Features:
- This weapon do more damage
- This weapon has zoom
- Launch Lasers
- This weapon has unlimited bullets

Credits:

KaOs - For his Dual MP5 mod

Cvars:


- zp_goldenak_dmg_multiplier <5> - Damage Multiplier for Golden Ak 47
- zp_goldenak_gold_bullets <1|0> - Golden bullets effect ?
- zp_goldenak_custom_model <1|0> - Golden ak Custom Model


*/



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

#define is_valid_player(%1) (1 <= %1 <= 32)

new AK_V_MODEL[64] = "models/zombie_plague/v_golden_ak47.mdl"
new AK_P_MODEL[64] = "models/zombie_plague/p_golden_ak47.mdl"

// Pcvars
new cvar_dmgmultipliercvar_goldbullets,  cvar_custommodel;

// Item ID
new g_itemid

new bool:g_HasAk[33]

new 
g_hasZoom33 ]
new 
bullets33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

public 
plugin_init()
{
    
    
/* CVARS */
    
cvar_dmgmultiplier register_cvar("zp_goldenak_dmg_multiplier""5")
    
cvar_custommodel register_cvar("zp_goldenak_custom_model""1")
    
cvar_goldbullets register_cvar("zp_goldenak_gold_bullets""1")
    
    
// Register The Plugin
    
register_plugin("[ZP] Extra: Golden Ak 47""0.04""AlejandroSk")
    
    
// Register Zombie Plague extra item
    
g_itemid zp_register_extra_item("Golden Ak 47"30ZP_TEAM_HUMAN)
    
    
// Death Msg
    
register_event("DeathMsg""Death""a")
    
    
// Weapon Pick Up
    
register_event("WeapPickup","checkModel","b","1=19")
    
    
// Current Weapon Event
    
register_event("CurWeapon","checkWeapon","be","1=1")
    
register_event("CurWeapon""make_tracer""be""1=1""3>0")
    
    
// Ham TakeDamage
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
register_forwardFM_CmdStart"fw_CmdStart" )
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
// Register user connect
public client_connect(id)
{
    
g_HasAk[id] = false
}
// Register user connect
public client_disconnect(id)
{
    
g_HasAk[id] = false
}
// Register about the user is dead
public Death()
{
    
g_HasAk[read_data(2)] = false
}
//
public fwHamPlayerSpawnPost(id)
{
    
g_HasAk[id] = false
}
// Register misc stuff
public plugin_precache()
{
    
precache_model(AK_V_MODEL)
    
precache_model(AK_P_MODEL)
    
m_spriteTexture precache_model("sprites/dot.spr")
    
precache_sound("weapons/electro5.wav")
}
// Get the model in there
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_viewmodel2AK_V_MODEL)
        
set_pev(idpev_weaponmodel2AK_P_MODEL)
    }
    return 
PLUGIN_HANDLED
}
//
public checkWeapon(id)
{
    new 
plrClipplrWeap[32]
    new 
plrWeapId
    
    plrWeapId 
read_data(2)
    
    if (
plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        
checkModel(id)
    }
    else 
    {
        return 
PLUGIN_CONTINUE
    
}
    
    if (
plrClip == 0)
    {
        
// If the user is out of ammo..
        
get_weaponname(plrWeapIdplrWeap31)
        
// Get the name of their weapon
        
give_item(idplrWeap)
        
engclient_cmd(idplrWeap
        
engclient_cmd(idplrWeap)
        
engclient_cmd(idplrWeap)
    }
    return 
PLUGIN_HANDLED
}
// Dmg multiplier
public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if ( 
is_valid_playerattacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_dmgmultiplier ) )
    }
}
// Handle the ak47
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_hasZoomid ])
        {
            
g_hasZoom[id] = true
            cs_set_user_zoom
idCS_SET_AUGSG552_ZOOM)
        }
        else 
        {
            
g_hasZoomid ] = false
            cs_set_user_zoom
idCS_RESET_ZOOM)
            
        }
        
    }
    return 
PLUGIN_HANDLED
}

// Making the trail behind bullets
public make_tracer(id)
{
    if (
get_pcvar_num(cvar_goldbullets))
    {
        new 
clip,ammo
        
new wpnid get_user_weapon(id,clip,ammo)
        new 
pteam[16]
        
        
get_user_team(idpteam15)
        
        if ((
bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id]) 
        {
            new 
vec1[3], vec2[3]
            
get_user_origin(idvec11// origin; your camera point.
            
get_user_origin(idvec24// termina; where your bullet goes (4 is cs-only)
            
            // Emit Sound
            
emit_sound(id,CHAN_ITEM"weapons/electro5.wav"1.0ATTN_NORM0PITCH_NORM)
            
            
//BEAMENTPOINTS
            
message_beginMSG_BROADCAST,SVC_TEMPENTITY)
            
write_byte (0)     //TE_BEAMENTPOINTS 0
            
write_coord(vec1[0])
            
write_coord(vec1[1])
            
write_coord(vec1[2])
            
write_coord(vec2[0])
            
write_coord(vec2[1])
            
write_coord(vec2[2])
            
write_shortm_spriteTexture )
            
write_byte(1// framestart
            
write_byte(5// framerate
            
write_byte(2// life
            
write_byte(10// width
            
write_byte(0// noise
            
write_byte255 )     // r, g, b
            
write_byte215 )       // r, g, b
            
write_byte)       // r, g, b
            
write_byte(200// brightness
            
write_byte(150// speed
            
message_end()
        }
    
        
bullets[id] = clip
    
}
    
}
// A player choose it
public zp_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid)
    {
        if ( 
g_HasAk[player] == true )
            return 
PLUGIN_HANDLED;
        
        if ( 
user_has_weapon(playerCSW_AK47))
        {
            
drop_prim(player)
        }
    }
    return 
PLUGIN_HANDLED
}
// It drops the other primary weapon (slot1)
stock drop_prim(id
{
    new 
weapons[32], num
    get_user_weapons
(idweaponsnum)
    for (new 
0numi++) {
        if (
Wep_ak47 & (1<<weapons[i])) 
        {
            static 
wname[32]
            
get_weaponname(weapons[i], wnamesizeof wname 1)
            
engclient_cmd(id"drop"wname)
        }
    }

I dont play ZP, but i think still its a good idea
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.

Last edited by TitANious; 05-05-2009 at 15:41.
TitANious is offline
Send a message via MSN to TitANious
AlejandroSk
BANNED
Join Date: Nov 2008
Location: Aqui, en mi casa. Karma:
Old 05-05-2009 , 15:38   Re: [ZP] Extra Item: Golden Ak - 47 v0.04 Fixed
Reply With Quote #40

Its not SH its ZP
AlejandroSk is offline
Send a message via MSN to AlejandroSk
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 03:18.


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