[Tutorial] Creating a basic user control panel
#21

Lol you need host and domain
Reply
#22

pozz , jel bi mi mogo napravit neki tut ono kao potpis da kopiras link i da ti cuva statse, nesto slicno ovako, da ti objasnim, pises u igri npr /potpiљi , i na forumu na nekoj stranici ti se stvori onako kao SIG da ti pise slika ime novac i tako?
(translation: hi, can you make me tutorial like you copy link and save stats, pr. /domyucp and it do a SIG where is picture of you and money, level.. sry my english )
Reply
#23

@Krunsy in this section you must post on English!
I can make something like that but I need some info about table/or ini file but I don't want to fuck up with that so... There is a tutorial about something similar to that...
Reply
#24

Ok, if i have problem ill PM you
Reply
#25

Allright i have a Basic y_ini saving system. I dont have any knowledge about Mysql. I dont know what is needed for what?

Can i make a user control panel using this for my server? Do i need to convert my script to MYSQL or SqLite or BlazingUserDB ? Is that so?
Reply
#26

Quote:
Originally Posted by Ballu Miaa
View Post
Allright i have a Basic y_ini saving system. I dont have any knowledge about Mysql. I dont know what is needed for what?

Can i make a user control panel using this for my server? Do i need to convert my script to MYSQL or SqLite or BlazingUserDB ? Is that so?
You don't have to but that would be better than leaving ini based saving accounts and other!
If you still don't want to convert to MySQL than you should see how Grex made it in Grex's Control Panel!
Reply
#27

Nice good tutorial
Reply
#28

Wow nice stuff.

You can maybe make a second tutorial on how to buy stuff for in-game with iPoints or something?.
Reply
#29

Quote:
Originally Posted by System64
View Post
You don't have to but that would be better than leaving ini based saving accounts and other!
If you still don't want to convert to MySQL than you should see how Grex made it in Grex's Control Panel!
Allright i will do so but the thread was for Linux.

Any other way i can do that?
Reply
#30

Quote:
Originally Posted by Ballu Miaa
View Post
Allright i will do so but the thread was for Linux.

Any other way i can do that?
He tested it on Linux, why shouldn't you test it on Windows?

Quote:
Originally Posted by Windows32
View Post
Wow nice stuff.

You can maybe make a second tutorial on how to buy stuff for in-game with iPoints or something?.
Thanks. I don't understand you about this suggestion?
Reply
#31

Quote:
Originally Posted by System64
View Post
Thanks. I don't understand you about this suggestion?
He means that you can get points, and use these points to buy in game items
Reply
#32

Quote:
Originally Posted by Claude
View Post
He means that you can get points, and use these points to buy in game items
Which points, really don't understand what you/he talk about :S
Reply
#33

Very good tutorial, thanks!
Reply
#34

Quote:
Originally Posted by System64
View Post
Which points, really don't understand what you/he talk about :S
Let's say you're running a TDM server where you gain money and using money you can buy upgrades like more armor points. You save players' money and armor amount to the MySQL database. Then in your UCP profile you could see your armor and next to it would be a button to upgrade it, without going in-game.

(It's just a matter of creating a few queries adding armor to the old value and removing X amount of money.)
Reply
#35

Quote:
Originally Posted by System64
View Post
He tested it on Linux, why shouldn't you test it on Windows?
What do you suggest? How can i get started?
Reply
#36

Awesome tut keep it up
Reply
#37

Hey, i have one question. How i can make that the system read my string password. If i have that password: 713fd215226cbef0467c6c9b000bf2db how i can read this ?
Reply
#38

Quote:
Originally Posted by Gertin
View Post
Hey, i have one question. How i can make that the system read my string password. If i have that password: 713fd215226cbef0467c6c9b000bf2db how i can read this ?
That's hashed password, you can't un-hash it!
Reply
#39

For me it`s not working ..
Reply
#40

Doesn't work for me either. Well, I should say that i got it all working except for the part of it showing the player's info. I have everything set up right, but for some reason this line doesn't work:
Code:
    echo "<br><br>Name: ".$name."<br> Money: ".$money."<br> Score: ".$score."<br> Kills: ".$kills."<br> Deaths: ".$deaths;
Here's my hole part:
Code:
<?php 

include("config.php"); //including our config.php 
session_start(); //starting session 
error_reporting(0); 

if(isset($_SESSION['username'])) //if session is set, so if user is logged in... 
{ 
    $username = $_SESSION['username']; //setting variable username as one from session 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'");  //selecting all from table users where username is name that your is loged in 
    echo "Welcome ".$_SESSION['username']; //saying welcome to user! 
    while($row = mysql_fetch_assoc($query)) //looping thousgt table to get informations 
    { 
        $name = $row['Name']; //selecting user name, change 'username' to your field name 
        $money = $row['Money']; //selecting user money, change 'money' to your field name 
        $score = $row['PlayerLevel']; //selecting user score, change 'score' to your field name 
        $kills = $row['AdminLevel']; //selecting user kills, change 'kills' to your field name 
        $deaths = $row['Bank']; //selecting user deaths, change 'deaths' to your field name 
    } 
    echo "<br><br>Name: ".$name."<br> Money: ".$money."<br> Score: ".$score."<br> Kills: ".$kills."<br> Deaths: ".$deaths; 
} 
else header('location: index.php'); //if user isn't loged in it will redirect him on login.php 

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Basic UCP</title>
</head>
</html>
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)