Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: Mohamed Boubekri on Jan 29, 2018, 09:17 PM

Title: [Release] Report System
Post by: Mohamed Boubekri on Jan 29, 2018, 09:17 PM
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.

Title: Re: Sample Report System With DataBase
Post by: pro on Jan 30, 2018, 09:04 AM
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.
Title: Re: Sample Report System With DataBase
Post by: Mohamed Boubekri on Jan 30, 2018, 09:24 AM
Hmmmm You Are Right, Will Add Time() Soon.
Thank :)
Title: Re: Sample Report System With DataBase
Post by: Retard on Jan 30, 2018, 01:28 PM
Good work bro
Title: Re: Sample Report System With DataBase
Post by: Mohamed Boubekri on Jan 30, 2018, 02:49 PM
Updated. Time Added.
Title: Re: Sample Report System With DataBase
Post by: MEGAMIND on Jan 30, 2018, 08:00 PM
Quote from: Ali Ahmed on Jan 30, 2018, 01:28 PMGood work bro
ahm ahm
Title: Re: Sample Report System With DataBase
Post by: Mohamed Boubekri on Jan 30, 2018, 08:45 PM
Quote from: MEGAMIND on Jan 30, 2018, 08:00 PM
Quote from: Ali Ahmed on Jan 30, 2018, 01:28 PMGood work bro
ahm ahm

What ???
Title: Re: [Release] Report System
Post by: Retard on Feb 04, 2018, 07:48 AM
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 );
}
Title: Re: [Release] Report System
Post by: haxerx on Feb 04, 2018, 02:31 PM
Good Work Man! I like your efforts instead of crying or begging for scripts ;)
Title: Re: [Release] Report System
Post by: Mohamed Boubekri on Feb 04, 2018, 04:05 PM
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 ;)
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Feb 06, 2018, 03:29 PM
bro its show only admins?
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Feb 06, 2018, 03:35 PM
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);
}
}
}
}
Title: Re: [Release] Report System
Post by: Mohamed Boubekri on Feb 06, 2018, 07:23 PM
Quote from: =RK=MarineForce on Feb 06, 2018, 03:29 PMbro its show only admins?
Nah.
Title: Re: [Release] Report System
Post by: Mohamed Boubekri on Feb 06, 2018, 07:26 PM
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
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Feb 13, 2018, 01:54 PM
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);
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Feb 13, 2018, 01:55 PM
How i can add this

[RK]MarineForce Banned from server reason hacking By Admin MarineForcWE $@
Title: Re: [Release] Report System
Post by: umar4911 on Apr 10, 2018, 03:22 PM
Quote from: Mohamed on Feb 06, 2018, 07:26 PM
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
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);
}
}
}
}
}
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Apr 10, 2018, 10:26 PM
nice TY
Title: Re: [Release] Report System
Post by: [KM]Helathien on Apr 12, 2018, 10:44 AM
Thanks! For the Data(); thing :D. Its gonna help me alot :D. Great.
Btw Suggestion: Also add command for admins /checkreports or /reports! :D
Title: Re: [Release] Report System
Post by: Mohamed Boubekri on Apr 12, 2018, 03:40 PM
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
Title: Re: [Release] Report System
Post by: NicusorN5 on Apr 12, 2018, 04:08 PM
Heh nice didnt know squireill had a function that returns the date nice script lol.
Title: Re: [Release] Report System
Post by: =RK=MarineForce on Apr 26, 2018, 06:15 PM
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 ..
Title: Re: [Release] Report System
Post by: NicusorN5 on Jun 12, 2018, 01:01 PM
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?