Raised This Month: $ Target: $400
 0% 

Help with set_task()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-06-2004 , 14:56   Help with set_task()
Reply With Quote #1

I cant use wait so what do i use?
I was told set_task would do the job, but i dont know how to use that ...
Ideally this should work out so it show red(for 1 sec), white(for 1 sec), and blue(for 1 sec) then the hole thing disapears.
(Yes i do know this will be on top of each other.)

Code:
public client_connect(id) {     new dyAuthID[32], dyUserIP[32], dyUserName[32]     get_user_authid(id, dyAuthID, 31)     get_user_ip(id, dyUserIP, 31, 1)     get_user_name(id, dyUserName, 31)     if(get_user_flags(id)&ADMIN_ADMIN){         server_cmd("tsay 255000000 [ADMIN]%s has joined the server;wait;wait;wait;wait", dyUserName)         server_cmd("tsay 255255255 [ADMIN]%s has joined the server;wait;wait;wait;wait", dyUserName)         server_cmd("tsay 000000255 [ADMIN]%s has joined the server;wait;wait;wait;wait", dyUserName)     }else{         server_cmd("tsay 255255000 %s has joined the server", dyUserName)     } }
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
Bad HAL 9000
Senior Member
Join Date: Mar 2004
Location: Minnesota, USA
Old 07-06-2004 , 15:49  
Reply With Quote #2

I dont suggest using a existing command "tsay" I suggest building a whole new message command. doing it that way would not work, because it would print 3 lines 3 different colors, because standard tsay scrolls down when it prints a new message.
__________________
Bad HAL 9000 is offline
Send a message via ICQ to Bad HAL 9000 Send a message via AIM to Bad HAL 9000 Send a message via MSN to Bad HAL 9000 Send a message via Yahoo to Bad HAL 9000
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-06-2004 , 15:50  
Reply With Quote #3

.......... I does ..........
I have not seen that
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
Bad HAL 9000
Senior Member
Join Date: Mar 2004
Location: Minnesota, USA
Old 07-06-2004 , 15:54  
Reply With Quote #4

I think it does, I cant remember if I added that or it was default lol.

Well, it would look SOMTHING like this

untested, I think it will work, maybe not. Also, dont use client_connect
use client_putinserver Well, you dont have to but it is called later on so there is a chance you can see your own welcome message
Code:
/* AMX Mod script. * * (c) 2003, Bad HAL 9000 * This file is provided as is (no warranties). */ #include <amxmodx> new dyAuthID[32], dyUserIP[32], dyUserName[32] public plugin_init(){     register_plugin("HAX","1.0","Bad HAL 9000") } public client_putinserver(id) {         get_user_authid(id, dyAuthID, 31)     get_user_ip(id, dyUserIP, 31, 1)     get_user_name(id, dyUserName, 31)     if(get_user_flags(id)&ADMIN_ADMIN){     set_task(15.0, "display_red", 110)     }else{         server_cmd("amx_tsay yellow %s has joined the server", dyUserName)     } } public display_red() {     server_cmd("amx_tsay red [ADMIN]%s has joined the server", dyUserName)     set_task(1.0, "display_green", 111)     remove_task(110) } public display_green() {     server_cmd("amx_tsay green [ADMIN]%s has joined the server", dyUserName)     set_task(1.0, "display_blue", 112)     remove_task(111) } public display_blue() {     server_cmd("amx_tsay blue [ADMIN]%s has joined the server", dyUserName)     remove_task(112) }
__________________
Bad HAL 9000 is offline
Send a message via ICQ to Bad HAL 9000 Send a message via AIM to Bad HAL 9000 Send a message via MSN to Bad HAL 9000 Send a message via Yahoo to Bad HAL 9000
FroXeN
Senior Member
Join Date: Apr 2004
Location: Freecode is a loser.
Old 07-06-2004 , 16:44  
Reply With Quote #5

nice work hal
__________________
Looking for friends!!!

http://Ms-Proxy.Com Join the fun!
FroXeN is offline
Send a message via ICQ to FroXeN
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 14:52.


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