The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Function Help
Author Message
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #1
Add Function Help
Hi guys,

I'm trying to add a function to all the players participating in an event, but something is going wrong. The Event start but the function is not added.

This is my script :


Code:
[FUNCTION HUNGERGAMES_start]
IF (<VAR.HUNGERGAMES_PLAYERS> > 1)
    SRC.EVENT_HUNGER_GAMES_DM // This function should be added
    SERV.ALLCLIENTS SYSMESSAGE @09c1 [Hunger Games]: The Event has begun! Event Gate is now closed.
...
....

This is the Function

Code:
[FUNCTION EVENT_HUNGER_GAMES_DM]
if !(<src.tag0.events>==e_event_hungergames)
    src.sysmessage @09c1 You have 30 minutes for the Deathmach!
        serv.newitem event_hunger_games_dm_memory
            serv.newitem event_hunger_games_dm_timer
        src.act.equip
    endif
return 1

The Timer and Memory

Code:
[ITEMDEF EVENT_HUNGER_GAMES_DM_memory]
ID=i_memory
TYPE=t_eq_script
NAME=Event Hunger Games DM Memory

on=@create
attr=04

ON=@equip
timer=60

on=@timer
IF (<CONT>)
    IF (<MORE1>)
        CONT.MESSAGE=<EVAL <MORE1>>
        MORE1=<MORE1> +- 1
        TIMER=1
        RETURN 1
    ENDIF
cont.go 6116,1234,1
remove
return 1

[ITEMDEF EVENT_HUNGER_GAMES_DM_TIMER]
ID=i_memory
TYPE=t_eq_script
NAME=Event Hunger Games DM Timer

on=@create
attr=04
more=9

ON=@equip
timer=1

on=@timer
IF ( <CONT> )
    IF ( <MORE1> )
            MORE1=<MORE1>-1
            TIMER=1
            RETURN 1
        ELSE
        REMOVE
    ENDIF
ENDIF
RETURN 1

Someone help me
(This post was last modified: 10-08-2014 07:50 AM by Van Glan Bloom.)
10-08-2014 07:49 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Add Function Help - Van Glan Bloom - 10-08-2014 07:49 AM
RE: Add Function Help - Extreme - 10-08-2014, 08:22 AM
RE: Add Function Help - XuN - 10-08-2014, 08:39 PM
RE: Add Function Help - Extreme - 10-09-2014, 01:08 AM
RE: Add Function Help - Van Glan Bloom - 10-08-2014, 10:28 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)