Raised This Month: $ Target: $400
 0% 

MSG_ONE with no target entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TotalCS
Member
Join Date: Aug 2008
Old 12-29-2009 , 04:05   MSG_ONE with no target entity
Reply With Quote #1

Hello!I`ve got a problem with a plugin.I modified some lines and now after i die the server it`s crashing.It displays this error:
MSG_ONE or MSG_ONE_UNRELIABLE with no target entity

Code:
public event_set_power(id)
{
    message_begin(MSG_ONE, g_hide_weapon, _, id)
    write_byte(1<<4)
    message_end()
    set_task(0.1, "round_start_effects", id)
    set_task(0.5, "team_scanner", id)
    if(cs_get_user_team(id) == CS_TEAM_T)
    {
        switch(get_pcvar_num(zombie_level))
        {
            case 1:
            { 
                set_task(0.1, "zombie_power_1", id)
            }
            case 2:
            { 
                set_task(0.1, "zombie_power_2", id)
            }
            case 3:
            { 
                set_task(0.1, "zombie_power_3", id)
            }
            case 4:
            { 
                set_task(0.1, "zombie_power_4", id)
            }
            case 5:
            { 
                set_task(0.1, "zombie_power_5", id)
            }
            case 6:
            { 
                set_task(0.1, "zombie_power_6", id)
            }
            case 7:
            { 
                set_task(0.1, "zombie_power_7", id)
            }
            case 8:
            { 
                set_task(0.1, "zombie_power_8", id)
            }
            case 9:
            { 
                set_task(0.1, "zombie_power_9", id)
            }
            case 10:
            { 
                set_task(0.1, "zombie_power_10", id)
            }
        }
    }
}
What`s the problem?
TotalCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-29-2009 , 08:29   Re: MSG_ONE with no target entity
Reply With Quote #2

event_set_power() is a callback from what ?
__________________
Arkshine is offline
TotalCS
Member
Join Date: Aug 2008
Old 12-29-2009 , 09:06   Re: MSG_ONE with no target entity
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
event_set_power() is a callback from what ?
register_event("ResetHUD", "event_set_power", "be")
TotalCS is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 12-29-2009 , 10:29   Re: MSG_ONE with no target entity
Reply With Quote #4

Use Ham_Spawn from HamSandwich module instead of ResetHud
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
TotalCS
Member
Join Date: Aug 2008
Old 12-29-2009 , 10:58   Re: MSG_ONE with no target entity
Reply With Quote #5

Like this?
Code:
register_event("Ham_Spawn", "event_set_power", "be")
TotalCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-29-2009 , 11:19   Re: MSG_ONE with no target entity
Reply With Quote #6

RegisterHam("Ham_Spawn", "player", "event_set_power", 1)
__________________
Arkshine is offline
TotalCS
Member
Join Date: Aug 2008
Old 12-29-2009 , 11:43   Re: MSG_ONE with no target entity
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
RegisterHam("Ham_Spawn", "player", "event_set_power", 1)
Same error...
TotalCS is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 12-29-2009 , 13:59   Re: MSG_ONE with no target entity
Reply With Quote #8

check is_user_alive(id)
__________________
minimiller is offline
Send a message via MSN to minimiller
Reply


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


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