AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Show message every 5 seconds... (https://forums.alliedmods.net/showthread.php?t=262701)

BaD CopY 05-10-2015 13:09

Show message every 5 seconds...
 
Can anyone create code who shows chat message every 5 seconds...

fysiks 05-10-2015 13:20

Re: Show message every 5 seconds...
 
Yes. So, what is your plugin request?

BaD CopY 05-10-2015 13:49

Re: Show message every 5 seconds...
 
Request to make thet simple plugin, who shows this message every five seconds - (example): "By typing /rs you can reset your score to 0"

fysiks 05-10-2015 13:57

Re: Show message every 5 seconds...
 
That should be programmed into the plugin that provides that functionality.

BaD CopY 05-10-2015 14:01

Re: Show message every 5 seconds...
 
But thets all I want... if you want to help me more, check my other request :))

indraraj striker 05-11-2015 03:58

Re: Show message every 5 seconds...
 
here you go:
PHP Code:

#include <amxmodx>

public client_putinserver(id)
{
set_task(5.0,"Show_message_in_every_5_sec",id,_,_,"b");
}

/* Calls function on specified time.
* Flags:
* "a" - repeat.
* "b" - loop task.
* "c" - do task on time after a map timeleft.
* "d" - do task on time before a map timelimit. 
native set_task(Float:time,const function[],id = 0,const parameter[]="",len = 0,const flags[]="", repeat = 0);
*/

public Show_message_in_every_5_sec(id)
{
    
client_print(id,print_chat,"Welcome to the alliedmodders")



BaD CopY 05-11-2015 04:28

Re: Show message every 5 seconds...
 
It's shows message so much times, not every 5 seconds...

BaD CopY 05-11-2015 04:53

Re: Show message every 5 seconds...
 
look man, I think code must remove task (sometimes) :) If I set task to 15.0, message will me shows again every second...

BaD CopY 05-11-2015 04:57

Re: Show message every 5 seconds...
 
PLzz test your code before you post it here and set task to 15.0 or hight...

indraraj striker 05-11-2015 05:09

Re: Show message every 5 seconds...
 
please look at your title before you are requesting something :3
you said 5 sec i set whats wrong with you man

try again set task 60.0 = 1 minute
see the result
you can adjust yourself if again repetition is going on just increase the float time
#lastcomment bie take care of your attitude


All times are GMT -4. The time now is 20:06.

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