Jump to content

Refresh real time maintenance by vegas


Recommended Posts

  • Premium
5 hours ago, emanuel said:

Hi,someone know a function for vegas maintenance system ? I mind..text and maintenance window dont appear in reall time,i need to teleport to appear updates on text and window..i try in python but not working,i think it's something in source,i need a refresh function for this system.Thank you !

Create a timer that's working just with an event flag and that timer opens the def from python. This way all players will see it in real time.Don't worry about loop timer, it won't create any load in server. Good luck.

 

cmdchat("_test_start")  ( quest command )

_test_start you put in game.py at def __ServerCommand_Build(self): 

Example:

	def __ServerCommand_Build(self):
		serverCommandList={
        	"_test_start"        : self.TestSystem,
        }

 

and after you create the def at the end of the file and you are done.

Link to comment
Share on other sites

Acum 7 ore, Dobrescu Sebastian a spus:

Create a timer that's working just with an event flag and that timer opens the def from python. This way all players will see it in real time.Don't worry about loop timer, it won't create any load in server. Good luck.

 

cmdchat("_test_start")  ( quest command )


_test_start you put in game.py at def __ServerCommand_Build(self): 

Example:


	def __ServerCommand_Build(self):
		serverCommandList={
        	"_test_start"        : self.TestSystem,
        }

 

and after you create the def at the end of the file and you are done.

I Will try, thx✌️

Link to comment
Share on other sites

  • Active Member
On 1/5/2018 at 12:11 AM, emanuel said:

Yes i see,he mother focker >.<

It was a very bad joke also not related to the subject

On 1/5/2018 at 1:35 AM, Daenerys said:

You can get it by paying Vegas money ,and talk to people properly.
 

R u crazy ? He has big prices ...

 

You need try try a code like this(P.S: I don't know how he coded the system yet, never checked, never need that system)

const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); // you need to include desc_manager for this

            for (itertype(c_ref_set) it = c_ref_set.begin(); it != c_ref_set.end(); ++it) // look through all players(all connections, all cores)
            {
                LPCHARACTER ch = (*it)->GetCharacter(); // get the LPCHARACTER pointer from the itor
                if (!ch)
                    continue;

 

                ch->ChatPacket(CHAT_TYPE_COMMAND, "environment %d", value); // Do something for each player, preferably send a command from server to client and after that the client will handle the command inside game.py and then the python part comes helping.
            }

 

I gave you a hint, not all the code, as I said above, I didn't checked the system yet because I didn't need it.

  • Love 1
Link to comment
Share on other sites

Acum 34 minute, Exygo a spus:

It was a very bad joke also not related to the subject

R u crazy ? He has big prices ...

 

You need try try a code like this(P.S: I don't know how he coded the system yet, never checked, never need that system)

const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); // you need to include desc_manager for this

            for (itertype(c_ref_set) it = c_ref_set.begin(); it != c_ref_set.end(); ++it) // look through all players(all connections, all cores)
            {
                LPCHARACTER ch = (*it)->GetCharacter(); // get the LPCHARACTER pointer from the itor
                if (!ch)
                    continue;

 

                ch->ChatPacket(CHAT_TYPE_COMMAND, "environment %d", value); // Do something for each player, preferably send a command from server to client and after that the client will handle the command inside game.py and then the python part comes helping.
            }

 

I gave you a hint, not all the code, as I said above, I didn't checked the system yet because I didn't need it.

Yes,who know c++ ,can make it,not me :D

Link to comment
Share on other sites

  • Active Member

We tried to help you, we gave you advices if you don't know anything it's your problem but I tell you stop bumping you are wasting your time, nobody will help you anymore.

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.