Jump to content
  • 0

Make timer run on specific map


Question

Posted (edited)

been trying to work on this but not getting any luck. so i decided to ask for help here. basically i want the timer to run/re-initialize when inside guild_vs2 and stop when the player changes maps. i tried several configurations but the timer keeps running after changing maps. help

OnPCLoadMapEvent:
if ( strcharinfo(3) == "guild_vs2" ) {
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
message strcharinfo(0), "Timer Start!";
end;
}
else {
stopnpctimer;
message strcharinfo(0), "Go back to PvP to re-initialize timer!"; }
end;

Edited by mofo

2 answers to this question

Recommended Posts

Posted

how about something like this ?

OnPCLoadMapEvent:
while( strcharinfo(3) == "mapname" ){
    // do whatever you want here...
   sleep2 3000; // or any time delay you want.
}
end;

  • Upvote 1
Posted (edited)

LOL i'm so noob at scripting i didn't know i could use "while". Thanks so much emistry, i'll test it later!

edit: still doesn't work. when i enter guild_vs2 the timer starts. when i change maps, it still keeps counting. argh

Edited by mofo

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...