Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEmulator Command Cooldowns
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Seriosk" data-source="post: 388139" data-attributes="member: 72056"><p>I know other people have already answered this but I guess I'll post an answer too incase anyone else wants to know another way of doing this... haven't got VS right now so I'll just have to write it here.</p><p></p><p>[SPOILER="Code"]</p><p>In Habbo.cs:</p><p>[CODE]</p><p>public DateTime CommandExecutedLast</p><p>{</p><p> get; private set;</p><p>}</p><p>[/CODE]</p><p>At the start of the command:</p><p>[CODE]</p><p>TimeSpan lastExecuted = Session.GetHabbo().CommandExecutedLast - DateTime.Now;</p><p>if (lastExecuted.Seconds < 5)</p><p>{</p><p> Session.SendWhispher("You're cooling down, please wait! [" + lastExecuted.Seconds + "/5]");</p><p> return;</p><p>}</p><p>[/CODE]</p><p></p><p>In your command file (at the very end)</p><p>[CODE]</p><p>Session.GetHabbo().CommandExecutedLast = DateTime.Now;</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Seriosk, post: 388139, member: 72056"] I know other people have already answered this but I guess I'll post an answer too incase anyone else wants to know another way of doing this... haven't got VS right now so I'll just have to write it here. [SPOILER="Code"] In Habbo.cs: [CODE] public DateTime CommandExecutedLast { get; private set; } [/CODE] At the start of the command: [CODE] TimeSpan lastExecuted = Session.GetHabbo().CommandExecutedLast - DateTime.Now; if (lastExecuted.Seconds < 5) { Session.SendWhispher("You're cooling down, please wait! [" + lastExecuted.Seconds + "/5]"); return; } [/CODE] In your command file (at the very end) [CODE] Session.GetHabbo().CommandExecutedLast = DateTime.Now; [/CODE] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEmulator Command Cooldowns
Top