Raised This Month: $ Target: $400
 0% 

cant compile simple code ..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 09-03-2012 , 18:15   cant compile simple code ..
Reply With Quote #1

PHP Code:
 #include <amxmodx> 
#include <hamsandwich>
#include <cstrike>
#include <fakemeta> 
#include <engine>


new const oldknife_sounds[][] =
{
"weapons/knife_deploy1.wav",    // Deploy Sound
"weapons/knife_hit1.wav",    // Hit 1
"weapons/knife_hit2.wav",    // Hit 2
"weapons/knife_hit3.wav",    // Hit 3
"weapons/knife_hit4.wav",    // Hit 4
"weapons/knife_hitwall1.wav",    // Hit Wall
"weapons/knife_slash1.wav",    // Slash 1
"weapons/knife_slash2.wav",    // Slash 2
"weapons/knife_stab.wav",
"common/wpn_select.wav" 
}


const 
m_pPlayer 41

public plugin_init()
{
register_plugin("Defibrilator""1.0""skype lemishev")
register_event("CurWeapon","switchweapon","be ","1=1","2!29"
register_forward(FM_EmitSound"fw_EmitSound"
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_knife""fw_Knife_PrimaryAttack_Post"1)
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_knife""fw_Knife_SecondaryAttack_Post"1)
}

public 
plugin_precache()
{
precache_model("models/knf_new2.mdl"
precache_sound("defibrilator/knife_hit1.wav"
precache_sound("defibrilator/knife_slash1.wav" )
precache_sound("defibrilator/knife_deploy1.wav" 
}

public 
switchweapon(id)

if( 
read_data(2) == CSW_KNIFE) {
set_pev(id,pev_viewmodel2,"models/knf_new2.mdl"
client_cmd(id,"speak defibrilator/knife_deploy1.wav"
}



public 
fw_EmitSound(idchannel, const sound[])
{

if(!
is_user_alive(id))
return 
FMRES_IGNORED 



// Check sound
for(new 0sizeof oldknife_soundsi++)
{
if(
equal(soundoldknife_sounds[i]))


return 
FMRES_SUPERCEDE
}
}

return 
FMRES_IGNORED
}



public 
fw_Knife_PrimaryAttack_Post(knife)
{    

static 
id
id 
get_pdata_cbase(knifem_pPlayer4)    

if(
is_user_connected(id))
emit_sound(idCHAN_WEAPON"defibrilator/knife_hit1"VOL_NORMATTN_NORM0PITCH_NORM



}

public 
fw_Knife_SecondaryAttack_Post(knife)
{    

static 
id
id 
get_pdata_cbase(knifem_pPlayer4)


if(
is_user_connected(id))
emit_sound(idCHAN_WEAPON"defibrilator/knife_slash1"VOL_NORMATTN_NORM0PITCH_NORM




amxx studio shows me problem in FW emit sound.
i took this part from my another plugin. and it works there fine. but after removing some code I cant compile plugin
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by YamiKaitou; 09-04-2012 at 13:40.
avril-lavigne is offline
 



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 08:17.


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