[Tool/Web/Other] [FS][PHP] SA-MP Orange Web Stats
#1

SA-MP Orange Web Stat version 2.0
_________________________________________________
About FS:

Commands:

/ossregister password
/osslogin password
/mystats


For Administrator:

/ossmakeadmin id (lvl 0-2) - For make admin, login in rcon, and do this: (/ossmakeadmin your_id 2) now, when you loggined (/osslogin password) you will be administrator.

/ossban id reason
_________________________________________________
Data, sending to DB:

Player:
1. Account Status (Banned\Active)
2. Administration Level
3. Kills
4. Deaths
5. Connects to server(s)
6. Register Date
7. Last Online

Server:
1. Murder on the server
2. Death on the server
3. Connect with the server
4. Number of players on the server
5. Date and time of first start
6. Date and time of last update
7. Total connects to DB
_________________________________________________
Player Stats updated every 10 minutes, and when player exited.
Server Statistics updated 1 time in 10 minutes, and if you disable fs ( Note: If we just close the server or via the command / rcon exit, then the statistics will not be updated, unplug the OSS (/rcon unloadfs OSS) )

Example: ТУТ

Sorry, 2х4 does not support the imposition of the text on the picture (userbar), that screen looks like he
_________________________________________________
Config:

Script:

All basic settings of the script are in the files:

OSSCfg - Server settings:

Server Name = My Server Name - Name of your server
Server IP = 127.0.0.1:7777 - IP adress
Website = www.mywebsite.ru - Your website with statistic
I Edit Config = 0 - After editing the server settings (name, IP, Web site), change this line to "1", else the server will not start
Server Added = 0 - This line does not touch, it checks whether the server is added to the database. (Added - 1, is added - 0 (Adds, changes to 1))

OSSDBConF - Data Base Settings:

SQL Host = localhost - Host (localhost, or IP Address)
SQL Data Base = Orange_DB - Database Name
SQL User = Orange - Databese User
SQL Password = D1s4pp34R - Database Password

_________________________________________________

So, now configure PHP.

In the folder "Web" you will find the files that you need to upload your site.

We need to change:

Web/system/database/db_main.php

In line $db = new sql_db(localhost, user, pass, db);

Изменить:

localhost - Host (localhost, or ip address)
db - Database Name
user - Database user
pass - Database Password

In file Web/pstats.php

Find the line with BBCode:
Код:
<INPUT TYPE=TEXT SIZE=37 NAME=user value="[img]www.mywebsite.ru/userbar.php?p=<?php echo "$pid"; ?>[/img]">
And replace "www.mywebsite.ru" on the address of your site.
_________________________________________________

Database config:

1. Create Database
2. We go in through PhpMyAdmin
3. Select DB
4. Click the top button "SQL"
5. Paste the query (in the file "SQL", located in the SA-MP Orange Web Stats\Server\SQL.txt")

Код:
 CREATE TABLE Users(`id` int(11) NOT NULL auto_increment PRIMARY KEY,`Username` varchar(30) NOT NULL,`Password` varchar(50) NOT NULL, `UserIP` varchar(16) NOT NULL, `Blocked` int(4) NOT NULL default '0', `AdminLevel` int(4) NOT NULL default '0', `Kills` int(40) NOT NULL default '0',`Deaths` int(40) NOT NULL default '0.00', `SCon` int(10) NOT NULL default '0', `Register_Date` varchar(30) NOT NULL, `Last_Online` varchar(30) NOT NULL, `BanReason` varchar(256) NOT NULL);
CREATE TABLE ServerInfo(`id` int(11) NOT NULL auto_increment PRIMARY KEY,`ServerName` varchar(30) NOT NULL,`ServerIP` varchar(50) NOT NULL, `sKills` int(40) NOT NULL default '0', `sDeaths` int(40) NOT NULL default '0',`sKDR` float(40) NOT NULL default '0.00',`sSCon` int(30) NOT NULL default '0', `OnlinePlayers` int(30) NOT NULL default '0', `First_Start` varchar(30) NOT NULL, `Last_Updated` varchar(30) NOT NULL, `DBExecute` int(30) NOT NULL default '0');
6. Click "OK"

Cool, tables created (It is important, if you change the name of the table, they will have to change in the script, and climb through the files web stats, for this does not change their )

_________________________________________________

So ready.

Download Uploadbox
Download Rapidshare
Download Depositfiles
Download RGHost

Also in the files to be plugin "MySQL.dll" and "libmysql.dll" (For Windows)

For Linux look Here
Also you need to compile mx_INI, get him Here

Title: Orange Stats Script
Version: 2.0
Authors:
Script: BaRRyS3R.mp3
WEB Stats: Raekwon, BaRRyS3R.mp3
Include mxINI: MX_Master
iparam, sparam: MX_Master
MySQL Plugin R3: G-sTyLeZzZ


_________________________________________________
Bugs
By Dixon:
1) give permission to the file to be written> Permission (Fillzila): 777
Now for those who have this kind of problem do not forget to give permission to the folder, subfolder and file!

2) Explanation: In your script to connect, the $ db = new sql_db departure does not expect to receive this type of variable (mysql5-6.pro) so we had to overcome to reach the variable thus:

Код:
$db = new sql_db('****','*****','*****','*****');
_________________________________________________
Sorry for bad English,
BaRRyS3R.mp3
Reply
#2

Is this a R!P 0ff or you coded it yourself?

Well nice though!
Reply
#3

Not bad. (:
Reply
#4

Quote:
Originally Posted by Daedalus
Is this a R!P 0ff or you coded it yourself?

Well nice though!
I code Script, and edit DCStats for Deadly Combinations from Raekwon.
Reply
#5

Nice.
Reply
#6

Hm nice
Reply
#7

Why don't you make it HTML 4.01 / XHTML valid?
Reply
#8

Quote:
Originally Posted by Matthias_
Why don't you make it HTML 4.01 / XHTML valid?
Sorry, i bad know web coding :\ I just edit DCStats.
Reply
#9

Thought so...
Reply
#10

Why do I get "SERVER: Unknown command." when I try to use /ossregister or /osslogin commands?

Nice script btw!
Reply
#11

Anybody knows why my server crashes few seconds after I turn it on!?!
Code:
[18:25:22]  Loading filter script 'OSSEN.amx'...
[18:25:22] 
>> Orange Stats System
> Loading...
> Connecting to DataBase...

[18:25:22] SA-MP Orange Stats Version 2.0
[18:25:22] >> OSS Data Base Config:
> SQL Host: localhost
> SQL Data Base: Orange_DB
> SQL User: Orange
> SQL Password: D1s4pp34R
This is from server_log.txt

Please help
Reply
#12

So basically this is a RIP off.
Reply
#13

> SQL Host: localhost
> SQL Data Base: Orange_DB
> SQL User: Orange
> SQL Password: D1s4pp34R

This is default settings, change it to your Database settings.
Reply
#14

ok I changed it, server still shuts down after few seconds

pleas help!
Reply
#15

Thank-you for credits.
Reply
#16

Quote:
Originally Posted by Reyal
ok I changed it, server still shuts down after few seconds

pleas help!
Do you even own your own MySQL database?
Reply
#17

how did u make it out off php? u must be prooo. Good job!
Reply
#18

I've got this warnings:
Code:
Notice: Undefined index: what in C:\Program Files (x86)\wamp\www\Web\players.php on line 3

Notice: Undefined index: sort in C:\Program Files (x86)\wamp\www\Web\players.php on line 4

Notice: Undefined variable: pages in C:\Program Files (x86)\wamp\www\Web\players.php on line 90

Notice: Undefined variable: pages in C:\Program Files (x86)\wamp\www\Web\players.php on line 9


Notice: Undefined index: what in C:\Program Files (x86)\wamp\www\Web\servers.php on line 3

Notice: Undefined index: sort in C:\Program Files (x86)\wamp\www\Web\servers.php on line 4

Notice: Undefined variable: pages in C:\Program Files (x86)\wamp\www\Web\servers.php on line 86

Notice: Undefined variable: pages in C:\Program Files (x86)\wamp\www\Web\servers.php on line 94
Reply
#19

Hello, I have a problem when connecting, looking at the logs it says Can not Connect to the MySQL ...

Because, when I put the address host> mysql5-6.pro wrote me this error on the page!

Parse error: syntax error, unexpected T_STRING in / homez.338/universadc/www/stats/system/database/db_main.php on line 5

Where is the problem, because if I put localhost it does not work!

Thank you in advance ...
Reply
#20

2dixon:

What write in 5 string? It must be like this:

Code:
$db = new sql_db(localhost, MSTest2, MSTest2, MSTest2);
- Connect to localhost (Denwer)

2RoamPT:

I do not know because of what caused these errors. You run the server on localhost?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)