AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved start/stop certain sprite (https://forums.alliedmods.net/showthread.php?t=314774)

Nutu_ 03-06-2019 12:21

start/stop certain sprite
 
how can i start a sprite and stop it?
like
PHP Code:

public abc {
    
start sprite
    set_task
(2.0 blabla)
}
public 
blabla {
    
stop sprite



<VeCo> 03-06-2019 12:30

Re: start/stop certain sprite
 
what sprite?

if you are using a custom entity, change its framerate

Nutu_ 03-06-2019 13:07

Re: start/stop certain sprite
 
it is like an aura that is around the player while he's pressing a letter, its not an entity i guess

raizo11 03-06-2019 14:17

Re: start/stop certain sprite
 
ce ai vrea sa faci ? fi mai explicit

Code:

stock attach_sprite( user_id )
{
        if ( !is_user_connected( user_id ) )
        {
                return;
        }

        message_begin( MSG_ALL, SVC_TEMPENTITY );
        write_byte( TE_PLAYERATTACHMENT );
        write_byte( user_id );
        write_coord( 60 );
        write_short( sprite_name );
        write_short( 9000 );
        message_end();
}

stock remove_sprite( user_id )
{
        if ( !is_user_connected( user_id ) )
        {
                return;
        }

        message_begin( MSG_ALL, SVC_TEMPENTITY );
        write_byte( TE_KILLPLAYERATTACHMENTS );
        write_byte( user_id );
        message_end();
}



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

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