Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: W3aPoN^ on Jul 20, 2017, 08:14 AM

Title: Need Help. @Terror_Styles
Post by: W3aPoN^ on Jul 20, 2017, 08:14 AM
I am using LMS System i Need a Timer That Stops LMS
example: The LMS will remain active for 5mins and then it auto stops
because i used it before and then a Problem occurs when i was using /lms the server says lms is already active then i use to stop server now i want a timer that stop it after 5min of its start Thanks @Terror_Styles You helped me a lot <3 <3 <3
Title: Re: Need Help. @Terror_Styles
Post by: Zone_Killer on Jul 20, 2017, 10:04 AM
which lms system are you using show me the code.
Title: Re: Need Help. @Terror_Styles
Post by: W3aPoN^ on Jul 20, 2017, 01:03 PM
Quote from: Zone_Killer on Jul 20, 2017, 10:04 AMwhich lms system are you using show me the code.
Doom Killer's LMS
Title: Re: Need Help. @Terror_Styles
Post by: Decent_946 on Jul 20, 2017, 03:48 PM
Well, Let me inform you that once LMS is over, it is turned off. When there are less than 2 players in LMs, it auto-matically stops. If you want a timer which stops LMS after 5 mins when started , you'll need to make some changes.
1st one, to add a timer in StartLMS() function. 2nd thing, you'll need to make a new function in order to stop LMS because it'll already be having some players. like,

function forcelmsend()  // this function is to be put in [i]_LMS array[/i]
{

 foreach( ID in players )
{
 local plr = FindPlayer( ID );
 if ( plr ) plr.Pos = iData[ plr.ID ];
}

}
   State = "OFF";
   Players.clear();
   Alive = 0;
   Message( "[#FFFFFF]* LMS was aborted due to lack of participants!" );
}
then call the function in startlms function as
NewTimer( "_LMS.forcelmsend", 500000, 1 );
I'm unsure whether the above function i posted will work or not. Made this as an example.

EDIT: Don't forget to delete the time when LMS ends before 5 mins. Timer delete function (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Timer.Delete)
Title: Re: Need Help. @Terror_Styles
Post by: Terror_Styles on Jul 20, 2017, 06:05 PM
Maybe you helped this guy out but next time

To avoid spam!


Thanks,