Raised This Month: $ Target: $400
 0% 

Calling custom classes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 07-28-2014 , 13:33   Calling custom classes
Reply With Quote #1

It doesn't work to calling custom classes
I can't compile it.

Code:
Error: Invalid expression, assumed zero on line 19
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "g"
#define VERSION "1.0"
#define AUTHOR "g"

#define RIC "debris/metal6.wav"
#define BLOCK "BMd_Block"

public plugin_precache()
    
precache_sound(RIC)


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHamFromEntity(Ham_TraceAttack,, BLOCK"shoot_item")
}

public 
shoot_item(entattackerFloat:damageFloat:direction[3], tracedamagebits)
{
    static 
Float:endpoint[3]
    
get_tr2(traceTR_vecEndPosendpoint)
    
draw_spark(endpoint)
    
    
engfunc(EngFunc_EmitSoundentCHAN_ITEMRIC0.5ATTN_STATIC0PITCH_NORM)

    return 
HAM_IGNORED
}

stock draw_spark(const Float:origin[3])
{
    
message_begin(MSG_ALLSVC_TEMPENTITY)
    
write_byte(TE_SPARKS)
    
engfunc(EngFunc_WriteCoordorigin[0])
    
engfunc(EngFunc_WriteCoordorigin[1])
    
engfunc(EngFunc_WriteCoordorigin[2])
    
message_end()

Class from main plugin:
PHP Code:
new const g_block_classname[] =                 "BMd_Block"
proffs is offline
 


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 13:09.


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