Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

[Q] Server_timer


Necro

Question

  • Premium

Hi, how can i do that: 

local name = pc.get_name()
server_timer(name)


when name.server_time begin

Because this: when name.server_time begin dont working. Thanks anyway

Link to comment
  • Answers 17
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

17 answers to this question

Recommended Posts

  • 0
  • Moon

Hi, how can i do that: 

local name = pc.get_name()
server_timer(name)


when name.server_time begin

Because this: when name.server_time begin dont working. Thanks anyway

It needs to be triggered by something :) a npc or a player via when login or when kill or something like that :)

 

local name = pc.get_name()

server_timer("name",5)

 

when name.server_timer begin

Link to comment
  • 0

i think he want. Try it with playerID and a Query to read Player.

BUT!!! You CAN'T Use pc.xxxxxx commands in Server timer!
There's NO! Player Instance without change the Server Timer Function!

It ends in a crash if you try to use a pc.xxxx Function

 

Greatz

Link to comment
  • 0
  • Premium

I trew:

 

function name()
    local jmeno = mysql_query("SELECT name from player_test.player WHERE name='"..pc.get_name().."' LIMIT 1")
end
when [test_quest.name(jmeno[1])].server_timer begin

and that:

		when (mysql_query("SELECT name from player_test.player WHERE name='"..pc.get_name().."' LIMIT 1")).server_timer begin

but result is the same: name must be give :/

Link to comment
  • 0
  • Premium

Why you need the player name to be the name for your server timer? Do you want to use it? Or what?

 

I need timer for every player izolate and my first idea was do like that but if you know better solution?

Link to comment
  • 0
  • Premium

 

Why you need the player name to be the name for your server timer? Do you want to use it? Or what?

 

I need timer for every player izolate and my first idea was do like that but if you know better solution?

 

 

Timer for every player? Not server timer, but timer. Simple timer.

Or you may work around with server timer arguments, but I don't think it will work for you.

 

You set argument like that:

server_timer("timer_name", time, numeric code)

And you get the argument like that:

when timer_name.server_timer begin
   local arg = get_server_timer_arg()
end

And because it's only numeric code you can use account id (pc.get_account_id())

Link to comment
  • 0
  • Premium

Maybe you're doing it wrong... I can't help you without information.

server_timer("tombola", 10, ..pc.get_account_id())

when tombola.server_timer begin

I did like that

Link to comment
  • 0
  • Premium

Why ... near pc.get_account_id()? Use it simple:

server_timer("tombola", 10, pc.get_account_id())

But is still not enough information. Where do you start this timer? In a player trigger (like login, letter, levelup) or where?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      Halloween 2021 Ninja M V2

    2. 0

      Visual Studio 2010 Ultimate

    3. 1

      Reduce server memory usage

    4. 31

      Metin2 Project - How to create à Metin2 private server on virtual machine

    5. 1

      Use BeltInventory slots without Belt

  • Recently Browsing

    • No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.