Raised This Month: $32 Target: $400
 8% 

client_print in sequence


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
minimovz
Member
Join Date: Jan 2011
Old 02-13-2011 , 22:21   client_print in sequence
Reply With Quote #1

I want a code to send three client_prints in a sequence defined in the plugin, I made a plugin that sends three client_prints random but is bad because I wanted in order and not in random
i'm sorry for my bad english, i don't speak english
minimovz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-13-2011 , 22:34   Re: client_print in sequence
Reply With Quote #2

PHP Code:
client_print()
client_print()
client_print() 
??

You probably need to explain in much more detail what you are trying to do.
__________________
fysiks is offline
minimovz
Member
Join Date: Jan 2011
Old 02-13-2011 , 23:08   Re: client_print in sequence
Reply With Quote #3

thanks for help but I want every client_print appear every 40 seconds, sorry, i forget to say
minimovz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-13-2011 , 23:09   Re: client_print in sequence
Reply With Quote #4

set_task()
http://www.amxmodx.org/funcwiki.php
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
minimovz
Member
Join Date: Jan 2011
Old 02-14-2011 , 00:01   Re: client_print in sequence
Reply With Quote #5

noo, I need the code altogether, how I do for three client_prints appear every 40 seconds in sequence, for example, starts the map, and appear a message written "hello" , then another 40 seconds appear a message writing "nice" and after 40 seconds appear another message written "1.6" and the cycle repeats
minimovz is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 02-14-2011 , 00:12   Re: client_print in sequence
Reply With Quote #6

PHP Code:
plugin_init()
{
    
set_task(40.0"Task1")
}

public 
Task1()
{
    
client_print()
    
set_task(40.0"Task2")
}

public 
Task2()
{
    
client_print()
    
set_task(40.0"Task1")

Elusive138 is offline
minimovz
Member
Join Date: Jan 2011
Old 02-14-2011 , 00:48   Re: client_print in sequence
Reply With Quote #7

Quote:
Originally Posted by Elusive138 View Post
PHP Code:
plugin_init()
{
    
set_task(40.0"Task1")
}

public 
Task1()
{
    
client_print()
    
set_task(40.0"Task2")
}

public 
Task2()
{
    
client_print()
    
set_task(40.0"Task1")

thank so much man, these codes worked
minimovz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-14-2011 , 01:06   Re: client_print in sequence
Reply With Quote #8

Here is a much more easily scalable code (i.e. you only need to add or remove message in g_szMessages):

PHP Code:
#include <amxmodx>
#include <amxmisc>

new const g_szMessages[][] = {
    
"Message 1",
    
"Message 2",
    
"Message 3"
}

public 
plugin_init()
{
    
set_task(40.0"showMessage", .flags="b")
}

public 
showMessage()
{
    static 
i
    client_print
(0print_chatg_szMessagesi++ % sizeof(g_szMessages) ])

__________________
fysiks 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 21:14.


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