18.03.2012, 09:31
About:
Hi, this is simple FS+website codded by me(Shabi RoxX).. Both FS and Website are connected to same database and there are two table in database , one for saving online player and other for action... This means you can see online player in our server any where from website and can also do any action like sending player a PM, slap player and much more listed below....
This means you can control your from mobile now :
Features:
Other RCON Commands:
About Script:
Its a simple Script with two timer using y_timers(******) , one for updating online players in database and other for getting action sended by website....
Bug:
No known bug, I also added LOADFS,RELOADFS,UNLOADFS but some how it cause server to shut down so I commented it.
Credits:
How to change mysql setting for pawn?
Open /scriptfiles and open mysql.cfg and change as:
Note:Use password = none if you are not using any password :
Codes:
About Website:
It's a simple website consists of 5 pages.... On each action you have to enter adminpass that can be change in adminpass.php
How to change mysql setting in website?
Open connection.php in notepad and change the following
Screen Shoots:
-----------------
----------------------
Installation:
╙Open /Server/scriptfiles/mysql.cfg and change you mysql setting.....
╙Open /webiste/connect.php in notepad and change you mysql setting....
Note:Mysql settings/connection for both FS and Website must be same
╙Open /webiste/adminpass.php in notepad to change your admin pass
Download:
V1:
By Mediafire.com
website:Download
FS:Downlaod
Full FS+website:Download
Hi, this is simple FS+website codded by me(Shabi RoxX).. Both FS and Website are connected to same database and there are two table in database , one for saving online player and other for action... This means you can see online player in our server any where from website and can also do any action like sending player a PM, slap player and much more listed below....
This means you can control your from mobile now :
Features:
Код:
╝List of online players with name , score , ip and action to do ╝Send Private message to any player whose online ╝Slap Player ╝Kick player with reason ╝Ban player with reason ╝SendMessageToAll
Код:
╝Restart Server ╝ShutDown Server ╝Change Host Name ╝Change GameMode Text ╝Change MapName ╝Change Website ╝Change Weather ╝Change gravity ╝Ban Ip ╝UnBan Ip
Its a simple Script with two timer using y_timers(******) , one for updating online players in database and other for getting action sended by website....
Bug:
No known bug, I also added LOADFS,RELOADFS,UNLOADFS but some how it cause server to shut down so I commented it.
Credits:
pawn Код:
/*===================================================
#
# Professional Server Controler V 1.0
# By Shabi RoxX
#
# Credits:
# ****** For sscanf plugin 2.5
# ****** For YSI
# BlueG For MySQL Plugin R6-2
#
#
# Copyright © 2012 sa-mp.com
#
#====================================================
Open /scriptfiles and open mysql.cfg and change as:
Код:
[Configrations] Host = 127.0.0.1 User = root Password = None Database = samp
Note:Use password = none if you are not using any password :
Codes:
pawn Код:
/*=============================================================================
# #
# Professional Server Controler V 1.0 #
# By Shabi RoxX #
# #
# Credits: #
# ****** For sscanf plugin 2.5 #
# ****** For YSI #
# BlueG For MySQL Plugin R6-2 #
# #
# #
# Copyright © 2012 sa-mp.com #
# #
#==============================================================================
*/
//=============================================================================
//# IncludeS #
//=============================================================================
#include <a_samp>
#include <sscanf2>
#include <YSI\y_ini>
#include <YSI\y_timers>
#include <a_mysql>
//=============================================================================
//# DefineS #
//=============================================================================
//============================================
// Colors #
//============================================
#define C_SKYBLUE 0x0BE3F4FF
#define C_YELLOW 0xFCF85FFF
#define C_LIME 0x00FF13FF
#define C_GREEN 0x5CA35FFF
#define C_ORANGE 0xFF8000FF
#define C_WHITE 0xFFFFFFFF
#define C_OFFWHITE 0xFFFCC6FF
#define C_RED 0xC40000FF
#define C_PINK 0xFF80C0FF
#define C_GREY 0x8F8F8FFF
#define C_GRAD 0xCFCFCFFF
//============================================
// Other #
//============================================
#define MAX_HOST_NAME 20
#define MAX_PASSWORD 16
#define MAX_USER_NAME 20
#define MAX_DB 10
//=============================================================================
//# New'S #
//=============================================================================
//============================================
// EnumS #
//============================================
enum mysql_info
{
Host[MAX_HOST_NAME],
User[MAX_USER_NAME],
Password[MAX_PASSWORD],
Database[MAX_DB]
}
new MySQL[mysql_info];
enum task_info
{
ID,
Action,
Target,
Comment[128]
}
new Task[task_info];
//=============================================================================
//# OnFilterScriptInit() #
//=============================================================================
public OnFilterScriptInit()
{
print("\n=============================================");
print("\n# #");
print("\n# Professional Server Controller v1.0 #");
print("\n# #");
print("\n# By Shabi RoxX #");
print("\n# #");
print("==============================================\n");
//============================================
// Loading Files #
//============================================
INI_Load("mysql.INI");
//============================================
// MySQL Part #
//============================================
new mysql_connected;
mysql_debug(1);
if(strcmp(MySQL[Password],"none",true) == 0) format(MySQL[Password],MAX_PASSWORD,"");//checking if pass is none set it to empty
mysql_connected = mysql_connect(MySQL[Host], MySQL[User], MySQL[Database],MySQL[Password]);//connetion to mysql databse
if(mysql_connected) printf("[MySQL] DataBase Connection Succeed.\n");
mysql_query("CREATE TABLE IF NOT EXISTS prosc(ID INT(2), ACTION INT(3), TARGET INT(4), COMMENT VARCHAR(128))");
mysql_query("CREATE TABLE IF NOT EXISTS playersconnected(ID INT(4), NAME VARCHAR(24), SCORE INT(6), IP VARCHAR(16))");
return 1;
}
//=============================================================================
//# OnFilterScriptExit() #
//=============================================================================
public OnFilterScriptExit()
{
new String[64];
for(new p = 0;p < MAX_PLAYERS;p++)
{
format(String, sizeof(String), "DELETE FROM `playersconnected` WHERE `ID` = '%d'",p);
mysql_query(String);
}
return 1;
}
INI:mysql[Configrations](name[], value[])
{
INI_String("Host", MySQL[Host],MAX_HOST_NAME);
INI_String("User", MySQL[User],MAX_USER_NAME);
INI_String("Password",MySQL[Password],MAX_PASSWORD);
INI_String("Database", MySQL[Database],MAX_DB);
return 1;
}
//=============================================================================
//# Timers/Tasks #
//=============================================================================
task PlayerUpdater[10000]()//checking every 10 seconds for player update :)
{
new pname[MAX_PLAYER_NAME],String[128],ip[16];
for(new p = 0;p < MAX_PLAYERS;p++)
{
format(String, sizeof(String), "DELETE FROM `playersconnected` WHERE `ID` = '%d'",p);
mysql_query(String);
if(IsPlayerConnected(p))
{
GetPlayerName(p,pname,MAX_PLAYER_NAME);
GetPlayerIp(p,ip,sizeof(ip));
format(String, sizeof(String), "INSERT INTO `samp`.`playersconnected` (`ID` ,`NAME` ,`SCORE` ,`IP`)VALUES ('%d', '%s', '%d', '%s')",p,pname,GetPlayerScore(p),ip);
mysql_query(String);
}
}
}
//By shabi RoxX
task ActionUpdater[2000]()//checking every 5 seconds for any action :)
{
new String[128],pname[MAX_PLAYER_NAME],qrun;
format(String, sizeof(String), "SELECT * FROM `prosc` WHERE `ID` = 1");
qrun = mysql_query(String);
mysql_store_result();
if(!mysql_num_rows(qrun))
{
mysql_query("INSERT INTO `prosc`(`ID`, `ACTION`, `TARGET`, `COMMENT`) VALUES ('1','0','0','none')");
}
while(mysql_fetch_row_format(String,"|"))
{
sscanf(String, "p<|>e<ddds[128]>",Task);
}
mysql_free_result();
GetPlayerName(Task[Target],pname,MAX_PLAYER_NAME);
switch(Task[Action])
{
case 1://SendClientMsgToAll
{
format(String,sizeof(String),"[PSC]{FFFFFF} Admin: %s.",Task[Comment]);
SendClientMessageToAll(C_LIME,String);
}
case 2://SendClientMsg
{
format(String,sizeof(String),"[PSC]{FCF85F} Admin PM: %s .",Task[Comment]);
SendClientMessage(Task[Target],C_LIME,String);
}
case 3://Slap Player
{
if(IsPlayerConnected(Task[Target]))
{
new Float:Pos[3];
GetPlayerPos(Task[Target],Pos[0],Pos[1],Pos[2]);
SetPlayerPos(Task[Target],Pos[0],Pos[1],Pos[2]+5);
}
}
case 4://Kick Player
{
if(IsPlayerConnected(Task[Target]))
{
format(String,sizeof(String),"AdminCMD: %s have been kicked from server by PSC, Reason: %s.",pname,Task[Comment]);
SendClientMessageToAll(C_RED,String);
Kick(Task[Target]);
}
}
case 5://ban Player
{
if(IsPlayerConnected(Task[Target]))
{
format(String,sizeof(String),"AdminCMD: %s have been banned from server by PSC, Reason: %s.",pname,Task[Comment]);
SendClientMessageToAll(C_RED,String);
BanEx(Task[Target],Task[Comment]);
}
}
case 6://restart server
{
format(String,sizeof(String),"[PSC]{FFFFFF} Server Restarting.");
SendClientMessageToAll(C_LIME,String);
SendRconCommand("gmx");
}
case 7://shut down server
{
format(String,sizeof(String),"[PSC]{FFFFFF} Server Shutting down.");
SendClientMessageToAll(C_LIME,String);
SendRconCommand("exit");
}
case 8://change host name
{
format(String,sizeof(String),"hostname %s",Task[Comment]);
SendRconCommand(String);
}
case 9://change gamemodetext
{
format(String,sizeof(String),"gamemodetext %s",Task[Comment]);
SendRconCommand(String);
}
case 10://change map name
{
format(String,sizeof(String),"mapname %s",Task[Comment]);
SendRconCommand(String);
}
case 11://change WebSite
{
format(String,sizeof(String),"weburl %s",Task[Comment]);
SendRconCommand(String);
}
//Cause Server restart some how :(
/*case 12://reloadfs
{
format(String,sizeof(String),"reloadfs %s",Task[Comment]);
SendRconCommand(String);
}
case 13://loadfs
{
format(String,sizeof(String),"loadfs %s",Task[Comment]);
SendRconCommand(String);
}
case 14://loadfs
{
format(String,sizeof(String),"unloadfs %s",Task[Comment]);
SendRconCommand(String);
}
*/
case 15://weather
{
format(String,sizeof(String),"weather %s",Task[Comment]);
SendRconCommand(String);
}
case 16://gravity
{
format(String,sizeof(String),"gravity %s",Task[Comment]);
SendRconCommand(String);
}
case 17://weather
{
format(String,sizeof(String),"banip %s",Task[Comment]);
SendRconCommand(String);
}
case 18://gravity
{
format(String,sizeof(String),"unbanip %s",Task[Comment]);
SendRconCommand(String);
}
}
format(String, sizeof(String), "UPDATE `samp`.`prosc` SET `ID` = '1', `ACTION` = '0',`TARGET` = '0',`COMMENT` = 'None' WHERE `prosc`.`ID` =1");
mysql_query(String);
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,C_WHITE,"This Server is using Professional Server Controller by Shabi RoxX.");
return 1;
}
It's a simple website consists of 5 pages.... On each action you have to enter adminpass that can be change in adminpass.php
PHP код:
<?php
$adminpass = "admin";// just change it and save
?>
Open connection.php in notepad and change the following
PHP код:
$mysql_host = 'localhost';//host name
$mysql_user = 'root';//user name
$mysql_pass = '';//password
$mysql_db = 'samp';//database
-----------------
----------------------
Installation:
╙Open /Server/scriptfiles/mysql.cfg and change you mysql setting.....
╙Open /webiste/connect.php in notepad and change you mysql setting....
Note:Mysql settings/connection for both FS and Website must be same
╙Open /webiste/adminpass.php in notepad to change your admin pass
Download:
V1:
By Mediafire.com
website:Download
FS:Downlaod
Full FS+website:Download