AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can you tell the server to wait? (https://forums.alliedmods.net/showthread.php?t=3371)

Dygear 07-05-2004 01:03

Can you tell the server to wait?
 
Code:
server_cmd("tsay 255000000 [ADMIN]%s has joined the server.;wait;wait;wait;wait", dyUserName)

Can you tell the server to wait?

Ryan 07-05-2004 01:34

no, in this case you would set a task with set_task()

Ryan 07-05-2004 01:35

err, wait a sec, i'm confused.. why would you want to use wait; ?

Bad HAL 9000 07-05-2004 01:56

I dont think he does, he wants a delay in there. use set_task

Dygear 07-05-2004 03:17

ok ... this is the idea ...

It will display

[ADMIN]Dygear has joined the server. (In Red, then white, then blue.)

Peli 07-05-2004 03:39

You could use a set_task function to maybe control the pause time I think.

AssKicR 07-05-2004 07:11

try like this

Code:
client_putinserver(id) {     if (access(id,ADMIN_ADMIN)) {         new parm[1]         parm[0]=id         set_task(1.0,"doRed",0,parm,1,"",0)         set_task(3.0,"doWhite",0,parm,1,"",0)         set_task(5.0,"doBlue",0,parm,1,"",0)     } } public doRed(parm[]) {     new name[33]     new id=parm[0]     get_user_name(id,name,32)     set_hudmessage(255,0,0,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(0,"[ADMIN] %s has joined the server",name); } public doWhite(parm[]) {     new name[33]     new id=parm[0]     get_user_name(id,name,32)     set_hudmessage(0,0,0,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(0,"[ADMIN] %s has joined the server",name); } public doBlue(parm[]) {     new name[33]     new id=parm[0]     get_user_name(id,name,32)     set_hudmessage(0,0,255,-1.0,-0.45,0,0.0,5.0,0.0,0.0,3);     show_hudmessage(0,"[ADMIN] %s has joined the server",name); }

QwertyAccess 07-05-2004 07:22

Looks like that would work fine.

Johnny got his gun 07-05-2004 15:01

Except it doesn't display to anyone but the admin entering, which would defeat the purpose...

Code:
new const PLUGINNAME[] = "Watch out, a patriot is inbound..." new const VERSION[] = "0.1" new const AUTHOR[] = "Unknown" #include <amxmodx> #include <amxmisc> public client_putinserver(id) {     if (access(id, ADMIN_ADMIN)) {         new parm[4]         parm[0] = id         // Red         parm[1] = 255         parm[2] = 0         parm[3] = 0         set_task(1.0, "justdoit", 0, parm, 4)         // White         parm[1] = 255         parm[2] = 255         parm[3] = 255         set_task(3.0, "justdoit", 0, parm, 4)         // Blue         parm[1] = 0         parm[2] = 0         parm[3] = 255         set_task(5.0, "justdoit", 0, parm, 4)     } } public justdoit(parm[4]) {     if (!is_user_connected(parm[0]))         return     new name[32]     get_user_name(parm[0], name, 31)     set_hudmessage(parm[1], parm[2], parm[3], -1.0, -0.45, 0, 0.0, 5.0, 0.0, 0.0, 3)     show_hudmessage(0, "[ADMIN] %s has joined the server", name) } public plugin_init() {     register_plugin(PLUGINNAME, VERSION, AUTHOR) }

Well, I didn't test this, so maybe there's a glitch somewhere...

BigBaller 07-05-2004 15:09

Quote:

new const PLUGINNAME[] = "Watch out, a patriot is inbound..."
haha that made me laugh.


All times are GMT -4. The time now is 14:46.

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