Hello, Many People Say Me, Give Me Link of Any Report Sys, i Don't Find It.
So Now I'm Make It With My Self.
First of All Add it in Your ( OnSriptLoad )
rp <- ConnectSQL("scripts/report.db");
QuerySQL(rp, "create table if not exists report ( Plr TEXT, Name TEXT, Reason TEXT, Day VARCHAR(25), Month VARCHAR(25), Year VARCHAR(25), Hour VARCHAR(25), Min VARCHAR(25) )");
Now Add it In Your Function ( command )
else if ( cmd == "report" )
{
if(!text) MessagePlayer("/report <Player> <Reason>",player);
//Here if You Like Make if player Not Registered
//Here if You Like Make if player Not Logged in
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Unknow Player.", player );
{
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( !reason ) MessagePlayer( "Make Reason.", player );
else if ( plr.Name==player.Name ) MessagePlayer( "You Can't Report yourself.", player );
else {
local now = date();
QuerySQL( rp, "INSERT INTO report ( Plr, Name, Reason, Day, Month, Year, Hour, Min ) VALUES ( '" + plr.Name + "', '" + player.Name + "', '" + reason + "', '" + now.day + "/', '" + now.month + "/', '" + now.year + "/', '" + now.hour + ":', '" + now.min + "' )" );
MessagePlayer("Report Successfully Inserted To DataBase",player);
Message("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+"");
}
}
}
}
NOTE: if You Want check who report & reason & time, Just Open The DataBase of The Report System.
NOTE: Thi its Just Sample System. Good Luck.
Good job.
I'd suggest to add more information about "plr" IP/UID/Position/Vehicle and time()
Position/Vehicle may be useful in case of "fly-hack"/"abusing-map-bugs" reports.
Hmmmm You Are Right, Will Add Time() Soon.
Thank :)
Good work bro
Updated. Time Added.
An Extra cmd
else if ( cmd == "reportlist" )
{
local query = QuerySQL( rp, "SELECT * FROM report" ), a=0;
if ( !query ) MessagePlayer(RED+"** >> No Players Are Reported.",player);
else {
while ( GetSQLColumnData( query, 0 ) != null )
{
MessagePlayer(RED+"** >> Player:[ "+GetSQLColumnData( query, 0 )+" ] Reported-Player:[ "+GetSQLColumnData( query, 1 )+" ] "+WHITE+"Reason:[ "+GetSQLColumnData( query, 2 )+" ].",player );
GetSQLNextRow( query );
a++;}
}
FreeSQLQuery( query );
}
Good Work Man! I like your efforts instead of crying or begging for scripts ;)
Quote from: haxerx on Feb 04, 2018, 02:31 PMGood Work Man! I like your efforts instead of crying or begging for scripts ;)
Lol Thanks xD ;)
bro its show only admins?
untested
else if ( cmd == "report" )
{
if(!text) MessagePlayer("/report <Player> <Reason>",player);
//Here if You Like Make if player Not Registered
//Here if You Like Make if player Not Logged in
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Unknow Player.", player );
{
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( !reason ) MessagePlayer( "Make Reason.", player );
else if ( plr.Name==player.Name ) MessagePlayer( "You Can't Report yourself.", player );
else {
local now = date();
QuerySQL( rp, "INSERT INTO report ( Plr, Name, Reason, Day, Month, Year, Hour, Min ) VALUES ( '" + plr.Name + "', '" + player.Name + "', '" + reason + "', '" + now.day + "/', '" + now.month + "/', '" + now.year + "/', '" + now.hour + ":', '" + now.min + "' )" );
MessagePlayer("Report Successfully Inserted To DataBase",player);
if ( status[ plr.ID ].Level > 2 )
MessagePlayer("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+" ", plr);
}
}
}
}
Quote from: =RK=MarineForce on Feb 06, 2018, 03:35 PMuntested
else if ( cmd == "report" )
{
if(!text) MessagePlayer("/report <Player> <Reason>",player);
//Here if You Like Make if player Not Registered
//Here if You Like Make if player Not Logged in
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Unknow Player.", player );
{
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( !reason ) MessagePlayer( "Make Reason.", player );
else if ( plr.Name==player.Name ) MessagePlayer( "You Can't Report yourself.", player );
else {
local now = date();
QuerySQL( rp, "INSERT INTO report ( Plr, Name, Reason, Day, Month, Year, Hour, Min ) VALUES ( '" + plr.Name + "', '" + player.Name + "', '" + reason + "', '" + now.day + "/', '" + now.month + "/', '" + now.year + "/', '" + now.hour + ":', '" + now.min + "' )" );
MessagePlayer("Report Successfully Inserted To DataBase",player);
if ( status[ plr.ID ].Level > 2 )
MessagePlayer("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+" ", plr);
}
}
}
}
Thi its not warning system.
Player also can do it. ;D
Nah,
i mean its send message Only Admins not players
look like : Player--- is Report plr Reason Hp hacked
if ( status[ plr.ID ].Level > 2 )
MessagePlayer("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+" ", plr);
How i can add this
[RK]MarineForce Banned from server reason hacking By Admin MarineForcWE $@
Quote from: Mohamed on Feb 06, 2018, 07:26 PMQuote from: =RK=MarineForce on Feb 06, 2018, 03:35 PMuntested
else if ( cmd == "report" )
{
if(!text) MessagePlayer("/report <Player> <Reason>",player);
//Here if You Like Make if player Not Registered
//Here if You Like Make if player Not Logged in
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Unknow Player.", player );
{
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( !reason ) MessagePlayer( "Make Reason.", player );
else if ( plr.Name==player.Name ) MessagePlayer( "You Can't Report yourself.", player );
else {
local now = date();
QuerySQL( rp, "INSERT INTO report ( Plr, Name, Reason, Day, Month, Year, Hour, Min ) VALUES ( '" + plr.Name + "', '" + player.Name + "', '" + reason + "', '" + now.day + "/', '" + now.month + "/', '" + now.year + "/', '" + now.hour + ":', '" + now.min + "' )" );
MessagePlayer("Report Successfully Inserted To DataBase",player);
if ( status[ plr.ID ].Level > 2 )
MessagePlayer("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+" ", plr);
}
}
}
}
Thi its not warning system.
Player also can do it. ;D
For that you this code
else if ( cmd == "report" )
{
if(!text) MessagePlayer("/report <Player> <Reason>",player);
//Here if You Like Make if player Not Registered
//Here if You Like Make if player Not Logged in
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) MessagePlayer( "Unknow Player.", player );
{
local reason = GetTok( text, " ", 2 NumTok( text, " " ) );
if ( !reason ) MessagePlayer( "Make Reason.", player );
else if ( plr.Name==player.Name ) MessagePlayer( "You Can't Report yourself.", player );
else {
local now = date();
QuerySQL( rp, "INSERT INTO report ( Plr, Name, Reason, Day, Month, Year, Hour, Min ) VALUES ( '" + plr.Name + "', '" + player.Name + "', '" + reason + "', '" + now.day + "/', '" + now.month + "/', '" + now.year + "/', '" + now.hour + ":', '" + now.min + "' )" );
MessagePlayer("Report Successfully Inserted To DataBase",player);
if ( status[ plr.ID ].Level > 2 )
MessagePlayer("You have reported player: "+plr.Name, player);
for(local i=0;i<=GetMaxPlayers();i++)
{
local plar = FindPlayer(i);
if(i && status[plar.ID].Level > 2) MessagePlayer("Player "+player.Name+" Has Report " +plr.Name+ " Reason: "+reason+" ", plar);
}
}
}
}
}
nice TY
Thanks! For the Data(); thing :D. Its gonna help me alot :D. Great.
Btw Suggestion: Also add command for admins /checkreports or /reports! :D
Quote from: Helathien on Apr 12, 2018, 10:44 AMThanks! For the Data(); thing :D. Its gonna help me alot :D. Great.
Btw Suggestion: Also add command for admins /checkreports or /reports! :D
Not Data(), its date();
Anyway Thank u ;D
Heh nice didnt know squireill had a function that returns the date nice script lol.
bro reportlist not working
ii m typing /reportlist not showing any happens
Bro can u do this? when admins join the srever show the report ..
Quote from: =RK=MarineForce on Apr 26, 2018, 06:15 PMbro reportlist not working
ii m typing /reportlist not showing any happens
Bro can u do this? when admins join the srever show the report ..
Can't you just stop copy-pasting all the scripts over here?