AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Script Question! (https://forums.alliedmods.net/showthread.php?t=57893)

Dtrixxer 07-13-2007 15:43

Script Question!
 
How would i make a script to display messages from like a time cvar
'new timer[9] = 15; //This is in seconds'???

also how would i make it display text from a file?

(With in file)
[Message 1]Owner: Dtrixxer
[Message 2]Admin Cost: $5
[Message 3]Vent IP: 42.1.2.561:5192
(End With in file)

Stuff like that or something just displaying after so many seconds (timer[9]).

toazron1 07-13-2007 16:40

Re: Script Question!
 
try searching for one of the many server rule plugins

Zenith77 07-13-2007 17:01

Re: Script Question!
 
Or ad plugins.

Howdy! 07-14-2007 06:57

Re: Script Question!
 
Code:


#include <amxmodx>

const messagenum = 5
new const messages[messagenum][] = {
    "message1",
    "message2",
    "message3",
    "message4",
    "message5"
}

public plugin_init() {
    register_plugin("", "", "")
    register_cvar("announce_time", "300.0")
    set_task(300.0, "advertise")
}

public advertise() {
    new rnd = random_num(0,messagenum-1)
    client_print(0,print_chat, "%s",messages[rnd])
    set_task(get_cvar_float("announce_time"), "advertise")
    return PLUGIN_HANDLED
}




All times are GMT -4. The time now is 21:31.

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