Raised This Month: $ Target: $400
 0% 

Function fwHamPlayerSpawnPost not found.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
alien100
Member
Join Date: May 2010
Location: Finland
Old 06-05-2011 , 12:58   Function fwHamPlayerSpawnPost not found.
#1

I have error in my log
HTML Code:
L 06/05/2011 - 19:38:31: [HAMSANDWICH] Function fwHamPlayerSpawnPost not found.
L 06/05/2011 - 19:38:31: [AMXX] Displaying debug trace (plugin "vip.amxx")
L 06/05/2011 - 19:38:31: [AMXX] Run time error 10: native error (native "RegisterHam")
L 06/05/2011 - 19:38:31: [AMXX]    [0] vip.sma::plugin_init (line 19)
Plugin
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>

static const COLOR[] = "^x04" //green
new maxplayers
new gmsgSayText

#define PLUGIN "Furien VIP"
#define VERSION "1.0"
#define AUTHOR "sMog"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
}

public 
FwdHamPlayerSpawnPost(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H && is_user_alive(id))
    {
        
set_user_healthidget_user_health(id) + 15);    
        
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE2)
        
           
give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
           
give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
            }
            
            case 
CS_TEAM_CT:
            {
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE1)
        
           
give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
                   
           
give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
           
           
give_item(id"weapon_elite")
           
cs_set_user_bpammo(idCSW_ELITE100)
            }
        }
    }


public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
contactinfo[256], contact[112]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s VIP ONLINE: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIP online.")
        
print_message(usermessage)
    }
    
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

Can someone fix it ?
__________________
alien100 is offline
Send a message via MSN to alien100 Send a message via Skype™ to alien100
bibu
Veteran Member
Join Date: Sep 2010
Old 06-05-2011 , 13:10   Re: Function fwHamPlayerSpawnPost not found.
#2

PHP Code:
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
->

PHP Code:
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1); 
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
alien100
Member
Join Date: May 2010
Location: Finland
Old 06-05-2011 , 17:30   Re: Function fwHamPlayerSpawnPost not found.
#3

thanks i try my host is down now.
__________________
alien100 is offline
Send a message via MSN to alien100 Send a message via Skype™ to alien100
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-05-2011 , 17:41   Re: Function fwHamPlayerSpawnPost not found.
#4

CaSE sEnsITivE. (Oh, and I guess it helps if they are spelled the same too )
__________________
fysiks is offline
alien100
Member
Join Date: May 2010
Location: Finland
Old 06-05-2011 , 18:37   Re: Function fwHamPlayerSpawnPost not found.
#5

Still same problem
Quote:
L 06/06/2011 - 010:24: [HAMSANDWICH] Function FwHamPlayerSpawnPost not found.
L 06/06/2011 - 010:24: [AMXX] Displaying debug trace (plugin "vip.amxx")
L 06/06/2011 - 010:24: [AMXX] Run time error 10: native error (native "RegisterHam")
L 06/06/2011 - 010:24: [AMXX] [0] vip.sma::plugin_init (line 42)
i added features too

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new g_MsgSync
new mpdmkbmhb
new gmsgSayText
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
new health_add
new health_hs_add

#define DAMAGE_RECIEVED
#define PLUGIN "Furien VIP"
#define VERSION "1.0"
#define AUTHOR "sMog"

#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
mpd register_cvar("money_per_damage","1")
    
mkb register_cvar("money_kill_bonus","100")
    
mhb register_cvar("money_hs_bonus","200")
    
health_add register_cvar("amx_vip_hp""10")
    
health_max register_cvar("amx_vip_max_hp""200")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
maxplayers get_maxplayers()
    
RegisterHam(Ham_Spawn"player""FwHamPlayerSpawnPost"1); 
    
register_event("DeathMsg""hook_death""a""1>0")
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
    
g_MsgSync CreateHudSyncObj()
#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}

public 
FwdHamPlayerSpawnPost(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H && is_user_alive(id))
    {
        
set_user_healthidget_user_health(id) + 15);
        
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
           
fm_give_item(id"item_assaultsuit");
           
fm_give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE2)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
            }
            
            case 
CS_TEAM_CT:
            {
           
fm_give_item(id"item_thighpack");
           
fm_give_item(id"item_assaultsuit");
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE1)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
                   
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
           
           
fm_give_item(id"weapon_elite")
           
cs_set_user_bpammo(idCSW_ELITE100)
            }
        }
    }
}

public 
on_damage(id)
{
    new 
attacker get_user_attacker(id)

#if defined DAMAGE_RECIEVED
    // id should be connected if this message is sent, but lets check anyway
    
if ( is_user_connected(id) && is_user_connected(attacker) )
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"%i^n"damage)
#else
    
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"%i^n"damage)
    }
}

public 
Damage(id)
{
    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint)
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
hitpoint==1money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
}

public 
death_msg()
{
    if(
read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
   
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_add)
   
// Screen fading
   
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   
write_short(1<<10)
   
write_short(1<<10)
   
write_short(0x0000)
   
write_byte(0)
   
write_byte(0)
   
write_byte(200)
   
write_byte(75)
   
message_end()
 
}

public 
client_authorized(id)
{
 
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
client_print(idprint_chat"[VIP] write /vip and u will see how get VIP and VIP privilegies.")


public 
handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/vips") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE
}

public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
contactinfo[256], contact[112]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s VIP ONLINE: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIP online.")
        
print_message(usermessage)
    }
    
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

__________________
alien100 is offline
Send a message via MSN to alien100 Send a message via Skype™ to alien100
matsi
Thinkosaur
Join Date: Sep 2006
Old 06-05-2011 , 18:42   Re: Function fwHamPlayerSpawnPost not found.
#6

Quote:
Originally Posted by alien100 View Post
Still same problem


i added features too

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new g_MsgSync
new mpdmkbmhb
new gmsgSayText
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
new health_add
new health_hs_add

#define DAMAGE_RECIEVED
#define PLUGIN "Furien VIP"
#define VERSION "1.0"
#define AUTHOR "sMog"

#if defined DAMAGE_RECIEVED
    
new g_MsgSync2
#endif

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
mpd register_cvar("money_per_damage","1")
    
mkb register_cvar("money_kill_bonus","100")
    
mhb register_cvar("money_hs_bonus","200")
    
health_add register_cvar("amx_vip_hp""10")
    
health_max register_cvar("amx_vip_max_hp""200")
    
health_hs_add register_cvar("amx_vip_hp_hs""15")
    
maxplayers get_maxplayers()
    
RegisterHam(Ham_Spawn"player""FwHamPlayerSpawnPost"1); 
    
register_event("DeathMsg""hook_death""a""1>0")
    
register_event("Damage""on_damage""b""2!0""3=0""4!0")
    
register_event("Damage","Damage","b")
    
register_event("DeathMsg","death_msg","a")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
    
g_MsgSync CreateHudSyncObj()
#if defined DAMAGE_RECIEVED
    
g_MsgSync2 CreateHudSyncObj()
#endif
}

public 
FwdHamPlayerSpawnPost(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H && is_user_alive(id))
    {
        
set_user_healthidget_user_health(id) + 15);
        
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_T:
            {
           
fm_give_item(id"item_assaultsuit");
           
fm_give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE2)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG2)
           
            }
            
            case 
CS_TEAM_CT:
            {
           
fm_give_item(id"item_thighpack");
           
fm_give_item(id"item_assaultsuit");
           
give_item(id"weapon_hegrenade")
           
cs_set_user_bpammo(idCSW_HEGRENADE1)
        
           
fm_give_item(id"weapon_flashbang")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
                   
           
fm_give_item(id"weapon_smokegrenade")
           
cs_set_user_bpammo(idCSW_FLASHBANG1)
           
           
fm_give_item(id"weapon_elite")
           
cs_set_user_bpammo(idCSW_ELITE100)
            }
        }
    }
}

public 
on_damage(id)
{
    new 
attacker get_user_attacker(id)

#if defined DAMAGE_RECIEVED
    // id should be connected if this message is sent, but lets check anyway
    
if ( is_user_connected(id) && is_user_connected(attacker) )
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
    {
        new 
damage read_data(2)

        
set_hudmessage(255000.450.5020.14.00.10.1, -1)
        
ShowSyncHudMsg(idg_MsgSync2"%i^n"damage)
#else
    
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
    {
        new 
damage read_data(2)
#endif
        
set_hudmessage(0100200, -1.00.5520.14.00.020.02, -1)
        
ShowSyncHudMsg(attackerg_MsgSync"%i^n"damage)
    }
}

public 
Damage(id)
{
    new 
weaponhitpointattacker get_user_attacker(id,weapon,hitpoint)
    if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
    if (
get_user_flags(attacker) & ADMIN_LEVEL_H
    {
        new 
money read_data(2) * get_pcvar_num(mpd)
        if(
hitpoint==1money += get_pcvar_num(mhb)
        
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
    }
}

public 
death_msg()
{
    if(
read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public 
hook_death()
{
   
// Killer id
   
nKiller read_data(1)
   
   if ( (
read_data(3) == 1) && (read_data(5) == 0) )
   {
      
nHp_add get_pcvar_num (health_hs_add)
   }
   else
      
nHp_add get_pcvar_num (health_add)
   
nHp_max get_pcvar_num (health_max)
   
// Updating Killer HP
   
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
   return;

   
nKiller_hp get_user_health(nKiller)
   
nKiller_hp += nHp_add
   
// Maximum HP check
   
if (nKiller_hp nHp_maxnKiller_hp nHp_max
   set_user_health
(nKillernKiller_hp)
   
// Hud message "Healed +15/+30 hp"
   
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
   
show_hudmessage(nKiller"Healed +%d hp"nHp_add)
   
// Screen fading
   
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   
write_short(1<<10)
   
write_short(1<<10)
   
write_short(0x0000)
   
write_byte(0)
   
write_byte(0)
   
write_byte(200)
   
write_byte(75)
   
message_end()
 
}

public 
client_authorized(id)
{
 
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
client_print(idprint_chat"[VIP] write /vip and u will see how get VIP and VIP privilegies.")


public 
handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/vips") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE
}

public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
contactinfo[256], contact[112]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_LEVEL_H)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s VIP ONLINE: ",COLOR)
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No VIP online.")
        
print_message(usermessage)
    }
    
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

Quote:
Originally Posted by bibu View Post
PHP Code:
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
->

PHP Code:
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1); 

Thats because you didn't change what he said.

You're missing d from:
RegisterHam(Ham_Spawn, "player", "FwHamPlayerSpawnPost", 1);

and then you have: public FwdHamPlayerSpawnPost(id)
matsi is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 06-05-2011 , 18:43   Re: Function fwHamPlayerSpawnPost not found.
#7

Can't you read?

Quote:
Originally Posted by bibu View Post
PHP Code:
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
->

PHP Code:
RegisterHam(Ham_Spawn"player""FwdHamPlayerSpawnPost"1); 
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 06-05-2011 , 18:45   Re: Function fwHamPlayerSpawnPost not found.
#8

Quote:
Originally Posted by bibu View Post
Can't you read?
I think he didn't see the difference between those two.
matsi is offline
Closed Thread



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 06:03.


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