Jump to content

Recommended Posts

  • Replies 17
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active Member

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
https://metin2.dev/topic/6819-q-server_timer/#findComment-43099
Share on other sites

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
https://metin2.dev/topic/6819-q-server_timer/#findComment-43125
Share on other sites

  • 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
https://metin2.dev/topic/6819-q-server_timer/#findComment-43128
Share on other sites

  • 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
https://metin2.dev/topic/6819-q-server_timer/#findComment-43134
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

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.