Skip to content

Can't get timer details from other resource #827

@MrDadosz

Description

@MrDadosz

Describe the bug
You can't check timer details from timer, that was created in other resource. isTimer function is working, but getTimerDetails isn't.

To reproduce

  1. create resource "test" with serverside file
  2. create resource "test2" with serverside file
  3. paste this code inside resource "test" and run it:
function outputSomething()
  outputChatBox("I'm working, you can get my details!")
end
local timer = setTimer(outputSomething, 1000, 0)
setElementData(root, "myTimer", timer)
  1. paste this code inside resource "test2" and run it:
local timerIsWorking = isTimer(getElementData(root, "myTimer"))
local timeLeft, amout, executions = getTimerDetails(getElementData(root, "myTimer"))
outputChatBox(tostring(timerIsWorking)..", "..tostring(timeLeft)..", "..tostring(amount)..", "..tostring(executions))
  1. resource "test2" will show info on chat:
    true, false, nil, nil

Expected behaviour
You could check timer details even if they're created in other resource.

Version
Server: Ubuntu 14, MTA:SA Server v1.5.6-release-14688
Client: Windows 10, Multi Theft Auto v1.5.6-release-16068.8.014

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions