Raised This Month: $51 Target: $400
 12% 

Code for "wait"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MspoR
Member
Join Date: Sep 2015
Old 01-02-2016 , 16:04   Code for "wait"
Reply With Quote #1

Hello guys, I'm planning to make Karaoke with Text. I the question is: Ideas how to make simple hud messages with any code "wait". Like Text, wait 5 seconds, next text, wait, text. Thanks for answers.
MspoR is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-02-2016 , 16:25   Re: Code for "wait"
Reply With Quote #2

If I understand you correctly this should help.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 01-02-2016 , 17:06   Re: Code for "wait"
Reply With Quote #3

And by this should help he means download the .sma and look at the code.
redivcram is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-02-2016 , 20:22   Re: Code for "wait"
Reply With Quote #4

How will the source of your text be provided?
__________________
Bugsy is offline
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 01-02-2016 , 21:47   Re: Code for "wait"
Reply With Quote #5

As far as I understood your question you want to make a timer thats triggered every 5 seconds ?
__________________
Let 7he gr0ovE r3Lease y0ur m!nd
addicted2sex is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-02-2016 , 22:14   Re: Code for "wait"
Reply With Quote #6

Not sure exactly what you need based on the info given, but this will play the lyric and then pause for the respective number of seconds for that lyric before playing the next. Can be easily changed to work with hud messages.
PHP Code:
#include <amxmodx>

enum Lyrics
{
    
szText512 ],
    
Float:fPause
}

new 
szLyrics[][ Lyrics ] =
{
    { 
"This is a lyric 1" 1.0 },
    { 
"This is a lyric 2" 2.0 },
    { 
"This is a lyric 3" 3.0 },
    { 
"This is a lyric 4" 4.0 },
    { 
"This is a lyric 5" 5.0 },
    { 
"This is a lyric 6" 6.0 }
}

new 
g_LyricIndex;

public 
plugin_init() 
{
    
register_clcmd"say start" "StartKaraoke" );
}

public 
StartKaraokeid )
{
    
g_LyricIndex 0;
    
    
set_taskszLyricsg_LyricIndex ][ fPause ] , "PlayLyric" );
    
client_printprint_chat szLyricsg_LyricIndex ][ szText ] );
}

public 
PlayLyric() 
{
    if ( ++
g_LyricIndex sizeofszLyrics ) )
    {
        
client_printprint_chat szLyricsg_LyricIndex ][ szText ] );
        
set_taskszLyricsg_LyricIndex ][ fPause ] , "PlayLyric" );
    }
    else
    {
        
client_printprint_chat "The song is over" );
    }

__________________

Last edited by Bugsy; 01-02-2016 at 22:20.
Bugsy is offline
MspoR
Member
Join Date: Sep 2015
Old 01-03-2016 , 02:56   Re: Code for "wait"
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Not sure exactly what you need based on the info given, but this will play the lyric and then pause for the respective number of seconds for that lyric before playing the next. Can be easily changed to work with hud messages.
PHP Code:
#include <amxmodx>

enum Lyrics
{
    
szText512 ],
    
Float:fPause
}

new 
szLyrics[][ Lyrics ] =
{
    { 
"This is a lyric 1" 1.0 },
    { 
"This is a lyric 2" 2.0 },
    { 
"This is a lyric 3" 3.0 },
    { 
"This is a lyric 4" 4.0 },
    { 
"This is a lyric 5" 5.0 },
    { 
"This is a lyric 6" 6.0 }
}

new 
g_LyricIndex;

public 
plugin_init() 
{
    
register_clcmd"say start" "StartKaraoke" );
}

public 
StartKaraokeid )
{
    
g_LyricIndex 0;
    
    
set_taskszLyricsg_LyricIndex ][ fPause ] , "PlayLyric" );
    
client_printprint_chat szLyricsg_LyricIndex ][ szText ] );
}

public 
PlayLyric() 
{
    if ( ++
g_LyricIndex sizeofszLyrics ) )
    {
        
client_printprint_chat szLyricsg_LyricIndex ][ szText ] );
        
set_taskszLyricsg_LyricIndex ][ fPause ] , "PlayLyric" );
    }
    else
    {
        
client_printprint_chat "The song is over" );
    }



Working. Good job, thanks.

Last edited by MspoR; 01-04-2016 at 07:40.
MspoR is offline
aSior
Member
Join Date: Jan 2016
Old 01-07-2016 , 15:43   Re: Code for "wait"
Reply With Quote #8

Bugsy, can you remake it for me please?
I want it to;
Show it on Hud (say @@text)
Only CT's can turn it on
In the first text on say it will show 'NAME just turned on the microphone!' Name = person who wrote on say 'start'
It'll show (on @@) texts in different colour (@@c, @@r, @@g)

I can't pay you for it :c
aSior is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 01-14-2016 , 08:10   Re: Code for "wait"
Reply With Quote #9

Quote:
Originally Posted by aSior View Post

I can't pay you for it :c
When did he ask for a payment ? Most of the coders here are for helping the community with their knowledge and not for money
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux is offline
aSior
Member
Join Date: Jan 2016
Old 01-14-2016 , 11:57   Re: Code for "wait"
Reply With Quote #10

Okay, i tough he will want money for his job ^^

But still no one helped ._.
aSior is offline
Reply



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 16:07.


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