Raised This Month: $ Target: $400
 0% 

wait time


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-02-2019 , 04:25   Re: wait time
Reply With Quote #2

hi
1 - declare a variable so we can increase/decrease it's value when needed.
2 - register your command.
3 - before printing message, increase variable value by 1 (++) (decrease = (--) , then get variable value on client_print. after that set a task and put function in it.
1 -
Code:
new g_timer

2 -
Code:
register_clcmd("say /test" , "test")
3 -
Code:
public test(id) {      g_timer ++      client_print(id , print_chat , "Example %d", g_timer)      set_task(10.0,"test") }

results :
Quote:
/test
Example1
After 10 sec...
Example2
After 10 sec...
Example3
After 10 sec...
Example4
........

Last edited by LearninG; 09-02-2019 at 04:46.
LearninG is offline
 



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 17:27.


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