AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A problem with a Plugin (https://forums.alliedmods.net/showthread.php?t=90202)

DEX 04-15-2009 07:46

A problem with a Plugin
 
PHP Code:

/* ===================================================
[Message stocks]
==================================================== */
stock draw_spark(const Float:origin[3])
{
    static 
o[3]
    
o[0] = floatround(origin[0])
    
o[1] = floatround(origin[1])
    
o[2] = floatround(origin[2])
    
emessage_begin(MSG_PVSSVC_TEMPENTITYo0)
    
ewrite_byte(TE_SPARKS)
    
ewrite_coord(o[0])
    
ewrite_coord(o[1])
    
ewrite_coord(o[2])
    
emessage_end()    
}

stock emsg_damage(player,dmg_save,dmg_take,dmg_type,Float:origin[3])
{
    
    
set_pev(player,pev_dmg_save,float(dmg_save))
    
set_pev(player,pev_dmg_take,float(dmg_take))
    
emessage_begin(MSG_ONEnd_msg_damage, {0,0,0}, player)
    
ewrite_byte(dmg_save)
    
ewrite_byte(dmg_take)
    
ewrite_long(dmg_type)
    
ewrite_coord(floatround(origin[0]))
    
ewrite_coord(floatround(origin[1]))
    
ewrite_coord(floatround(origin[2]))
    
emessage_end()
}

stock colored_msg(id,msg[])
{
    
message_begin(MSG_ONEnd_msg_saytext, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()
}

stock msg_statusicon(id,IconStatus:mode,icon[],color[3])
{
    static 
msg_type

    msg_type 
MSG_ONE
    message_begin
(msg_typend_msg_iconstatus, {0,0,0}, id)
    
write_byte(_:mode)
    
write_string(icon)
    
write_byte(color[0])
    
write_byte(color[1])
    
write_byte(color[2])
    
message_end()
    
    return
}

stock msg_shadowidx(idShadowIdX:long)
{
    if (
long == SHADOW_REMOVE)
        
cl_removed_shadow[id] = true
    
else
        
cl_removed_shadow[id] = false


I suppose here i have a problem because i get a message:
-----------------------------------
MSG_ONE or MSG_ONE_UNRELIABLE with no target entity
-----------------------------------
I get this message when my server gets full.
Example:
27/28 --> one player --> 28/28 --> crash :(
This is a part of modified crysis mod.


All times are GMT -4. The time now is 02:27.

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