Raised This Month: $ Target: $400
 0% 

Solved console_print


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shadow728988
Member
Join Date: Sep 2017
Old 06-05-2018 , 09:58   console_print
Reply With Quote #1

Hey guys, i just wanted to know if its possible to print a message in clients console every 30 seconds or so..
i know console_print(id, "text") is used and that maybe using a global variable we can.. like.
Code:
if(x = 30)
{
  set_task or console print
}
i might be wrong..Thank you for your help

Last edited by shadow728988; 06-06-2018 at 00:06. Reason: }
shadow728988 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-05-2018 , 10:31   Re: console_print
Reply With Quote #2

Yes it's possible
instinctpt1 is offline
shadow728988
Member
Join Date: Sep 2017
Old 06-05-2018 , 10:37   Re: console_print
Reply With Quote #3

help me maybe..
shadow728988 is offline
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 06-05-2018 , 11:03   Re: console_print
Reply With Quote #4

There you go:
https://www.amxmodx.org/api/amxmodx/set_task
__________________
Quote:
Originally Posted by wickedd View Post
Make me or STFU boy
pupdebox is offline
shadow728988
Member
Join Date: Sep 2017
Old 06-05-2018 , 11:40   Re: console_print
Reply With Quote #5

Quote:
Originally Posted by pupdebox View Post
i wanted it to print in every 30 seconds not spam for 30 seconds
using flag 'a' and a number would repeat it that many times
using 'b' that would just spam the console.
am i right?
shadow728988 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-05-2018 , 12:13   Re: console_print
Reply With Quote #6

Here
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Print in Console""1.0""DiGiTaL")
    
set_task(3.0"printText"___"b")
}

public 
printText() client_print(0print_console"Testing this!"
You can still use console_print too but for that you have to loop through all players and print to each of them
So in my opinion using client_print is better option

Last edited by instinctpt1; 06-05-2018 at 12:26. Reason: info
instinctpt1 is offline
shadow728988
Member
Join Date: Sep 2017
Old 06-05-2018 , 23:54   Re: console_print
Reply With Quote #7

Quote:
Originally Posted by instinctpt1 View Post
Here
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Print in Console""1.0""DiGiTaL")
    
set_task(3.0"printText"___"b")
}

public 
printText() client_print(0print_console"Testing this!"
You can still use console_print too but for that you have to loop through all players and print to each of them
So in my opinion using client_print is better option
thank you so much
shadow728988 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 10:14.


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