Register for your free account! | Forgot your password?

You last visited: Today at 23:07

  • Please register to post and access all features, it's quick, easy and FREE!


help redux source

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2017
Posts: 25
Received Thanks: 0
help redux source

hey guys
i try write a new command and i need to Select data
from my table
how can i do this?
i mean
SELECT *FROM Character where online=1
and i'll get all rows where online=1(with client.SendMessage)



adarelk2 is offline  
Old 10/27/2017, 06:53   #2
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,005
Received Thanks: 3,357
I know my honesty isn't always welcome here, but you should either figure this out on your own by using "Ctrl + F" and finding examples in your source, or giving up completely. Because this post scares me. People who can't help themselves with the simplest of problems like this have no chance in the world on hosting a private server (which poses a lot more difficult problems - such as Redux's monster AI). Other servers can always use support...


Spirited is offline  
Thanks
1 User
Old 10/27/2017, 23:35   #3
 
elite*gold: 0
Join Date: Oct 2017
Posts: 25
Received Thanks: 0
Quote:
Originally Posted by Spirited View Post
I know my honesty isn't always welcome here, but you should either figure this out on your own by using "Ctrl + F" and finding examples in your source, or giving up completely. Because this post scares me. People who can't help themselves with the simplest of problems like this have no chance in the world on hosting a private server (which poses a lot more difficult problems - such as Redux's monster AI). Other servers can always use support...
bro i'm not idiot... i tried finding examples in my source and i told you i didn't find it... i didn't see any line with "SELECT " query, It's very strange
can you help me and tell me one file with SELECT query?
adarelk2 is offline  
Old 10/28/2017, 03:40   #4
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,005
Received Thanks: 3,357
Quote:
Originally Posted by adarelk2 View Post
bro i'm not idiot... i tried finding examples in my source and i told you i didn't find it... i didn't see any line with "SELECT " query, It's very strange
can you help me and tell me one file with SELECT query?
You're not going to find that... It uses NHibernate. You need to either look for examples of other things happening or follow the code. You can't just search for one keyword and then give up. Learning how to read, cross reference, and search through code is important. It's an essential skill... Something you really shouldn't be asking a board for. It's like asking use how to read as an author.


Spirited is offline  
Old 11/02/2017, 05:22   #5
 
elite*gold: 0
Join Date: Jul 2007
Posts: 137
Received Thanks: 3
I suggest you use another source, do not waste time with this ... It is a very stable source, but the public version has many problems and can be a good time wasted ...

The function to know whether or not the player is online is this one. Search the source for examples

Code:
        public static Player GetUser(string name)
        {
            if (string.IsNullOrEmpty(name)) return null;
            name = name.ToLower();
            return Players.Values.FirstOrDefault(user => user.Character.Name.ToLower() == name);
        }
If it returns null, is because it is not online ... '-'
zakkwilde_17 is offline  
Old 12/19/2017, 01:54   #6
 
elite*gold: 0
Join Date: Nov 2014
Posts: 13
Received Thanks: 2
You do not access the database directly from the command class in Redux. Import the data that you want to check using NHIbernate(see how they imported Stats,Level,CP,Money etc) and just check it in the code afterwards. If you want to check players online the code in redux would be:

Quote:
foreach(var player in Managers.PlayerManager.Players.Values)
{
client.SendMessage(player.Name, ChatType.Talk2);
}


puzzleop is offline  
Reply


Similar Threads
[Learning Redux] Video Guides To Using Redux
06/20/2018 - CO2 PServer Guides & Releases - 38 Replies
So I know jumping into a new source can be scary and it's not something everyone wants to do, especially if they have a lot of content running already under something else (looking at you NCOS based servers!). These videos are designed to help...
[Selling] Saints Row 4, Metro Redux, Metro Last Light Redux Keys
12/14/2014 - Steam Trading - 1 Replies
---
[Buying] Metro 2033 Redux, Metro LL Redux, Fallout NV, Fallout 3, S.T.A.L.K.E.R: SoC
12/07/2014 - elite*gold Trading - 4 Replies
Suche diese Spiele für e*g (Steam).



All times are GMT +2. The time now is 23:07.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.