AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   include set_lights("a") in a set_task (https://forums.alliedmods.net/showthread.php?t=17193)

Obbin 08-27-2005 06:55

include set_lights("a") in a set_task
 
how do i include set_lights("a") in an set_task?

Code:
new freezetime = get_cvar_num("mp_freezetime") set_task(freezetime,/*what to put here*/)

v3x 08-27-2005 07:03

What do you want it to do? :)

Obbin 08-27-2005 07:20

when an new round starts (event_roundstart), everything should become black after the freezetime has ran out!

did you understand now or is my english so bad :lol:

v3x 08-27-2005 07:26

In your plugin_init:
Code:
register_logevent("new_round",2,"0=World triggered","1=Round_Start");
That is called right after freezetime ends.

Now, just make a function like this:
Code:
public new_round() {     set_lights("a"); }
Note: You can change new_round to whatever you'd like. :P

Obbin 08-27-2005 11:02

then why does this not work??

Code:
#include <amxmodx> #include <engine> public plugin_init() {    register_plugin("dark", "11", "Rockstar")    register_logevent( "Event_RoundStart", 2, "0=World triggered", "1=Round_Start" );    register_logevent( "Event_RoundEnd",   2, "0=World triggered", "1=Round_End" ); } public Event_roundstart(){ set_lights("a") return PLUGIN_CONTINUE } public Event_RoundEnd(){ set_lights("#OFF") return PLUGIN_CONTINUE } public client_putinserver(){ set_lights("a") return PLUGIN_CONTINUE }

JuXas 08-27-2005 11:16

Code:
public Event_roundstart() {
Code:
public Event_RoundStart() {

v3x 08-27-2005 11:16

Code:
register_logevent( "Event_RoundStart", 2, "0=World triggered", "1=Round_Start" );
Code:
public Event_roundstart(){
:roll:

XxAvalanchexX 08-27-2005 15:48

What they're saying is that function names are case-sensitive, and the case is different in register_logevent and the actual function's name.

v3x 08-27-2005 22:48

Seems as though he posted the answer the same time as I did. :P


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

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