AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved console_print (https://forums.alliedmods.net/showthread.php?t=308066)

shadow728988 06-05-2018 09:58

console_print
 
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

instinctpt1 06-05-2018 10:31

Re: console_print
 
Yes it's possible

shadow728988 06-05-2018 10:37

Re: console_print
 
help me maybe..

pupdebox 06-05-2018 11:03

Re: console_print
 
There you go:
https://www.amxmodx.org/api/amxmodx/set_task

shadow728988 06-05-2018 11:40

Re: console_print
 
Quote:

Originally Posted by pupdebox (Post 2595435)

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?

instinctpt1 06-05-2018 12:13

Re: console_print
 
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 :D

shadow728988 06-05-2018 23:54

Re: console_print
 
Quote:

Originally Posted by instinctpt1 (Post 2595444)
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 :D

thank you so much :D


All times are GMT -4. The time now is 04:36.

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