Jump to content

Map - When die respawn


Recommended Posts

  • Active Member

Hey guys,

is here someone who know how to do when you die in some map you will be able to respawn only in the map local town?

How it must work?

When you die in the map you can see two buttons: Respawn here and Respawn in town. When you click on Respawn here you will see the question dialog which will ask you if you want to Respawn here, if you click on yes and you will own a key you will be able to Respawn here if you won't have a key it will say in chat: You have no key, you can't respawn here, you can use only Respawn in town option. It will be based on map indexes and item needed to respawn in map from defined map indexes.

If someone can do it, I'll be glad :)

Thanks for answers!

Sincerely,

ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
1 oră în urmă, ReFresh a spus:

ref

root->uirestart.py

    def RestartHere(self):
        import background
        import chat
        if background.GetCurrentMapName() == "metin2_map_c1":
            chat.AppendChat(chat.CHAT_TYPE_INFO, "In this map you can only restart in the city.")
            return FALSE    
        net.SendChatPacket("/restart_here")

if you want to be sure that nobody will unpack your root and delete those lines you can do this in source

case SCMD_RESTART_HERE:

same way

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.