AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FSB_AllowOverflow, Streak Sprites help (https://forums.alliedmods.net/showthread.php?t=154444)

YakumoHiratsuhi 04-08-2011 12:45

FSB_AllowOverflow, Streak Sprites help
 
Well, i figured out how to do the streak sprites like in CSO, but i'm very noob at scripting graphical effects, i want that only the player that did the frag see the streak sprite, the others not, but for testing i used MSG_ALL.

also the sprite only has 1 frame, so i have to do a task to make it last longer, but it throws me that error: FSB_ALLOWOVERFLOW and all that stuff.

also, what's the origin i must write to make it appear in front of the player? yeah im noob at origins too :mrgreen:
PHP Code:

public KillSprite(id)
{
    
// Excedded sprites or bot
    
if(g_streak[id] > || is_user_bot(id))
        return;
    
    static 
origin[3]
    
get_user_origin(idorigin)
    
    
message_begin(MSG_ALLSVC_TEMPENTITY)
    
write_byte(TE_SPRITE)
    
write_coord(origin[0])
    
write_coord(origin[1]-3)
    
write_coord(origin[2]-3)
    
write_short(g_spriteindex[g_streak[id]])
    
write_byte(random_num(510))
    
write_byte(200)
    
message_end()
    
    
set_task(0.3"KillSprite"id_,_"a"5)
    


g_spriteindex is the global var that indexes the sprites, and g_streak is the number of the kill it will show.

ie; g_streak[id] = 4;

g_spriteindex[g_streak[id]]
this will show the '4 KILL!' sprite and so.

Sorry for my stupid english D:


All times are GMT -4. The time now is 19:45.

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