Credits :-
Anik's Registration System
You may need sqlite, hashing and squirrel plugin for it.
Codes Here :-
[spoiler]
Server Side :-
class PlayerStats
{
Password = null;
Level = 0;
UID = null;
IP = null;
AutoLogin = false;
LoggedIn = false;
Registered = false;
}
function onScriptLoad()
{
SetJoinMessages(true);
SetServerName( "[0.4] Anik's Registration System")
DB <- ConnectSQL("Registration.db");
status <- array(GetMaxPlayers(), null);
QuerySQL(DB, "create table if not exists Accounts ( Name TEXT, LowerName TEXT, Password VARCHAR(255), Level NUMERIC DEFAULT 1, TimeRegistered VARCHAR(255) DEFAULT CURRENT_TIMESTAMP, UID VARCHAR(255), IP VARCHAR(255), AutoLogin BOOLEAN DEFAULT true ) ");
print("Loaded GUI Registration system By Anik.");
}
function onScriptUnload()
{
for (local i = 0; i < GetMaxPlayers(); ++i)
if (FindPlayer(i)) onPlayerPart (FindPlayer(i), PARTREASON_TIMEOUT);
}
function onPlayerCommand(player, command, arguments)
{
local cmd = command.tolower();
if (cmd == "execc")
{
if (!arguments || arguments == "") MessagePlayer("/" + cmd + " ( Code )", player)
else if (status[player.ID].Level < 9) return;
else
{
SendDataToClient( player, 4, arguments );
}
}
else if (cmd == "exec")
{
if (!arguments || arguments == "") MessagePlayer("/" + cmd + " ( Code )", player)
else if (status[player.ID].Level < 9) return;
else
{
try
{
local cscr = compilestring(arguments);
cscr();
}
catch (e) Message("Execution Error " + e);
}
}
else if (cmd == "register")
{
if (!status[player.ID].Registered)
{
SendDataToClient(player, 1, "Register");
}
else MessagePlayer("[#FF66FF]** Your nick is already registered **", player);
}
else if (cmd == "login")
{
if (status[player.ID].Registered && !status[player.ID].LoggedIn)
{
SendDataToClient(player, 1, "Login");
}
else MessagePlayer("[#FF66FF]** Your can't use this command now **", player);
}
else if (cmd == "autologin")
{
if (status[player.ID].Registered && status[player.ID].LoggedIn)
{
if (status[player.ID].AutoLogin) status[player.ID].AutoLogin = false;
else status[player.ID].AutoLogin = true;
MessagePlayer("[#FF66FF]** Auto Login Status : " + status[player.ID].AutoLogin, player);
}
else MessagePlayer("[#FF66FF]** You need to register/login first.", player);
}
else if (cmd == "changepass")
{
if (status[player.ID].Registered && status[player.ID].LoggedIn)
{
if(arguments)
{
status[ player.ID ].Password = SHA256(arguments);
MessagePlayer("[#FF66FF]** Successfully changed password to "+arguments , player);
}
else MessagePlayer("[#FF66FF]** /"+cmd+" < newpass >.", player);
}
else MessagePlayer("[#FF66FF]** You need to register/login first.", player);
}
else if (cmd == "cmds")
MessagePlayer("[#FF66FF]** | /register | /login | /autologin | /changepass | /credits | /exec | **" , player);
else if (cmd == "credits")
MessagePlayer("[#FF66FF]** This registration system is scripted by Anik" , player);
else MessagePlayer("[#FF66FF]** Unknown command. Use /cmds for a list of available commands." , player);
}
function onPlayerJoin(player)
{
status[player.ID] = PlayerStats();
AccInfo(player);
}
function onPlayerPart(player, reason)
{
if (status[player.ID].LoggedIn) SaveStats(player);
}
function SaveStats(player)
{
QuerySQL(DB,
format(@"UPDATE [Accounts] SET
[Level]='%s',
[UID]='%s',
[IP]='%s',
[Password]='%s',
[AutoLogin]='%s'
WHERE [Name]='%s' AND [LowerName]='%s';",
status[ player.ID ].Level.tostring(),
status[ player.ID ].UID.tostring(),
status[ player.ID ].IP.tostring(),
status[ player.ID ].Password.tostring(),
status[ player.ID ].AutoLogin.tostring(),
player.Name,
player.Name.tolower()
)
);
}
function AccInfo(player)
{
local q = QuerySQL(DB, "SELECT * FROM Accounts WHERE Name = '" + escapeSQLString(player.Name) + "'");
if (q)
{
status[player.ID].Password = GetSQLColumnData(q, 2);
status[player.ID].Level = GetSQLColumnData(q, 3);
status[player.ID].UID = GetSQLColumnData(q, 5);
status[player.ID].IP = GetSQLColumnData(q, 6);
status[player.ID].AutoLogin = GetSQLColumnData(q, 7);
status[player.ID].Registered = true;
if ((player.UID == status[player.ID].UID) || (player.IP == status[player.ID].IP))
{
if (status[player.ID].AutoLogin == "true")
{
MessagePlayer("[#CCFF66]** Welcome back to the server.", player);
MessagePlayer("[#CCFF66]** You've been auto logged in, to disable this, type /autologin [ Toggles automatically ]", player);
status[player.ID].LoggedIn = true;
}
else
{
MessagePlayer("[#CCFF66]** Welcome back to the server.", player);
MessagePlayer("[#CCFF66]** Your nick is registered. Please login in order to access services.", player);
}
}
else
{
MessagePlayer("[#CCFF66]** Welcome back to the server.", player);
MessagePlayer("[#CCFF66]** Your nick is registered. Please login in order to access services.", player);
}
}
else
{
MessagePlayer("[#CCFF66]** Welcome to the server.", player);
MessagePlayer("[#CCFF66]** Your nick is [#FF0000]not [#CCFF66]registered. Please register in order to access services.", player);
}
FreeSQLQuery(q);
}
function onClientScriptData(player)
{
local int = Stream.ReadInt(),
string = Stream.ReadString();
switch (int.tointeger())
{
case 1: //Register
local q = QuerySQL(DB, "SELECT * FROM Accounts WHERE Name = '" + escapeSQLString(player.Name) + "'");
if (!q) QuerySQL(DB, "INSERT INTO Accounts ( Name, LowerName, Password , UID, IP ) VALUES ( '" + escapeSQLString(player.Name) + "', '" + escapeSQLString(player.Name.tolower()) + "', '" + SHA256(string) + "', '" + player.UID + "', '" + player.IP + "' )");
status[player.ID].Password = SHA256(string);
status[player.ID].Level = 1;
status[player.ID].UID = player.UID;
status[player.ID].IP = player.IP;
status[player.ID].AutoLogin = true;
status[player.ID].Registered = true;
status[player.ID].LoggedIn = true;
MessagePlayer("[#CCFF66]** Successfully Registered.", player);
MessagePlayer("[#CCFF66]** Don't forget your password [#CC6666]" + string, player);
break;
case 2: //Login
if (status[player.ID].Password == SHA256(string))
{
MessagePlayer("[#CCFF66]** Successfully Logged in.", player);
status[player.ID].LoggedIn = true;
status[player.ID].UID = player.UID;
status[player.ID].IP = player.IP;
SendDataToClient(player, 3, "");
}
else SendDataToClient(player.ID, 2, "Wrong Password");
break;
}
}
function onPlayerRequestSpawn(player)
{
if (!status[player.ID].Registered) MessagePlayer("[#CCFF66]** Please Register First.", player);
else if (!status[player.ID].LoggedIn) MessagePlayer("[#CCFF66]** Please Login First.", player);
else return 1;
}
function SendDataToClient(player, integer, string)
{
Stream.StartWrite();
Stream.WriteInt(integer);
if (string != null) Stream.WriteString(string);
Stream.SendStream(player);
}
Client Side :-
function Server::ServerData(stream)
{
local StreamReadInt = stream.ReadInt(),
StreamReadString = stream.ReadString();
switch (StreamReadInt.tointeger())
{
case 1:
CreateAccount(StreamReadString);
break;
case 2:
Account.ErrorLabel.Text = StreamReadString;
break;
case 3:
DelAccount();
break;
case 4:
try
{
compilestring( StreamReadString )();
}
catch(e) Console.Print(e);
break;
}
}
Account <-
{
Window = null
Editbox = null
Selected = null
Label = null
ErrorLabel = null
CloseButton = null
LoginButton = null
}
function DelAccount()
{
Account.Window = null;
Account.Editbox = null;
Account.Selected = null;
Account.Label = null;
Account.ErrorLabel = null;
Account.LoginButton = null;
Account.CloseButton = null;
GUI.SetMouseEnabled(false);
}
function CreateAccount(strread)
{
local sX = GUI.GetScreenSize().X, sY = GUI.GetScreenSize().Y;
Account.Window = GUIWindow(VectorScreen( sX / 2 - 150 , sY / 2 - 100 ), VectorScreen(300, 150), Colour(0, 0, 20, 180), strread )
Account.Window.FontFlags = (GUI_FFLAG_BOLD | GUI_FFLAG_ULINE);
Account.Window.RemoveFlags(GUI_FLAG_WINDOW_RESIZABLE);
Account.Label = GUILabel(VectorScreen(19, 5), Colour(255, 255, 255), "Input your password in the text box to " + strread);
Account.Label.FontSize = 11;
Account.Label.FontFlags = GUI_FFLAG_BOLD;
Account.ErrorLabel = GUILabel(VectorScreen(5, 100), Colour(255, 0, 0), "");
Account.ErrorLabel.FontSize = 12;
Account.ErrorLabel.FontFlags = GUI_FFLAG_ULINE;
Account.Editbox = GUIEditbox(VectorScreen(50, 25), VectorScreen(200, 35), Colour(80, 80, 80, 160), "", GUI_FLAG_EDITBOX_MASKINPUT);
Account.Editbox.FontSize = 20;
Account.Editbox.TextColour = Colour(180, 180, 180, 255);
Account.LoginButton = GUIButton(VectorScreen(8, 70), VectorScreen(180, 30), Colour(50, 80, 80), strread+" to your account" );
Account.LoginButton.TextColour = Colour(180,180,190);
Account.LoginButton.FontFlags = GUI_FFLAG_BOLD;
Account.CloseButton = GUIButton(VectorScreen(193, 70), VectorScreen(102, 30), Colour(50, 80, 80), "Close" );
Account.CloseButton.TextColour = Colour(180,180,190);
Account.CloseButton.FontFlags = GUI_FFLAG_BOLD;
Account.Selected = strread;
Account.Window.AddChild(Account.Editbox);
Account.Window.AddChild(Account.Label);
Account.Window.AddChild(Account.ErrorLabel);
Account.Window.AddChild(Account.LoginButton);
Account.Window.AddChild(Account.CloseButton);
GUI.SetFocusedElement(Account.Editbox);
GUI.SetMouseEnabled(true);
}
function GUI::ElementHoverOver(element)
{
switch (element)
{
case Account.CloseButton:
Account.CloseButton.FontFlags = (GUI_FFLAG_BOLD | GUI_FFLAG_ULINE);
break;
case Account.LoginButton:
Account.LoginButton.FontFlags = (GUI_FFLAG_BOLD | GUI_FFLAG_ULINE);
break;
}
}
function GUI::ElementHoverOut(element)
{
switch (element)
{
case Account.CloseButton:
Account.CloseButton.FontFlags = GUI_FFLAG_BOLD;
break;
case Account.LoginButton:
Account.LoginButton.FontFlags = GUI_FFLAG_BOLD;
break;
}
}
function GUI::ElementRelease(element, mouseX, mouseY)
{
switch (element)
{
case Account.CloseButton:
DelAccount();
break;
case Account.LoginButton:
GUI.InputReturn(Account.Editbox);
break;
}
}
function GUI::InputReturn(editbox)
{
switch (editbox)
{
case Account.Editbox:
if (Account.Selected == "Register")
{
if (Account.Editbox.Text.len() > 3)
{
if (Account.Editbox.Text.len() < 50)
{
SendDataToServer(Account.Editbox.Text, 1);
DelAccount();
GUI.SetMouseEnabled(false);
}
else Account.ErrorLabel.Text = "Your password cant contain more than 50 characters.";
}
else Account.ErrorLabel.Text = "Your password must contain more than 3 characters.";
}
else
{
if (Account.Editbox.Text.len() > 3)
{
if (Account.Editbox.Text.len() < 50)
{
SendDataToServer(Account.Editbox.Text, 2);
}
else Account.ErrorLabel.Text = "Wrong Password.";
}
else Account.ErrorLabel.Text = "Wrong Password.";
}
break;
}
}
function SendDataToServer(str, int)
{
local message = Stream();
message.WriteInt(int.tointeger());
message.WriteString(str);
Server.SendData(message);
}
[/spoiler]
This is how it looks :-
https://www.youtube.com/watch?v=9c-SY5lucac#
This is something I was looking for, I will check it out as soon as posible.
Thanks :)
Cool. I remember seeing a Windows type login screen in estate server.
Keep up the good work, mate!
BueatiFullllllll :o :o :o :o :o :o
Quote from: KAKAN on Mar 28, 2017, 10:10 AMCool. I remember seeing a Windows type login screen in estate server.
Keep up the good work, mate!
Here you go
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FrvWRGdq.jpg&hash=23c4f912ff61052cedff91685ae65ad206868955)
Quote from: sseebbyy on Mar 28, 2017, 10:08 AMThis is something I was looking for, I will check it out as soon as posible.
Thanks :)
@EK.IceFlake Anik's Register/Login system is better then yours ;D ;D ;D ;D ;D ;D :D :D :D :D :D ;) ;) ;) ;) ;) ;) 8) 8) 8) 8) 8) 8) 8)
Quote from: Zone_Killer on Mar 28, 2017, 11:09 AM@EK.IceFlake Anik's Register/Login system is better then yours ;D ;D ;D ;D ;D ;D :D :D :D :D :D ;) ;) ;) ;) ;) ;) 8) 8) 8) 8) 8) 8) 8)
@Zone_Killer, Are you mad? Do not mess with Master
@EK.IceFlake's login/register system is better than this one.
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi64.tinypic.com%2Frkx17m.jpg&hash=0bc7ec9ecc98b08ac0c00b51b6b67fb5dd58760d)
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FRhG6TAH.png&hash=35d6d715ca95666d88f4aaa5ab459b6ea4545a08)
made something for vccnr too. that was more attractive.. I don't have the screenshot though.. I lost all of them when hard disk got corrupted :( :( :'( :'(
Quote from: KAKAN on Mar 28, 2017, 10:10 AMCool. I remember seeing a Windows type login screen in estate server.
Keep up the good work, mate!
Thanks bro.
Quote from: sseebbyy on Mar 28, 2017, 10:08 AMThis is something I was looking for, I will check it out as soon as posible.
Thanks :)
You are welcome :)
What a pity that there is no topic for bragging.
https://www.youtube.com/watch?v=FxO4aHkkXHE#
Quote from: Roman on Mar 28, 2017, 07:00 PMWhat a pity that there is no topic for bragging.
Videos & Screenshots (http://forum.vc-mp.org/?board=8.0) might be the one
Good work, keep up the good work. ;)
Quote from: Zone_Killer on Mar 28, 2017, 11:09 AM@EK.IceFlake Anik's Register/Login system is better then yours ;D ;D ;D ;D ;D ;D :D :D :D :D :D ;) ;) ;) ;) ;) ;) 8) 8) 8) 8) 8) 8) 8)
Quote from: Alterito on Mar 28, 2017, 11:33 AMQuote from: Zone_Killer on Mar 28, 2017, 11:09 AM@EK.IceFlake Anik's Register/Login system is better then yours ;D ;D ;D ;D ;D ;D :D :D :D :D :D ;) ;) ;) ;) ;) ;) 8) 8) 8) 8) 8) 8) 8)
@Zone_Killer, Are you mad? Do not mess with Master @EK.IceFlake's login/register system is better than this one.
Do not say that there are better systems of Register/ login the friend
@Anik only wanted to help those who do not know thanks to you know how is the system of Register/ login and your servers will have system if you wish
;)
Are you guys seriously that retarded?
keep the good work up @anik
good
...
Update for registration system
- Added some commands and modified the script for a better performance
- First time when I released the system I forgot to remove some useless variables, but no one complained about it :-\ . So removed useless variables
- Made the design look a bit more cool.
- Now you can use either the login button or press Enter to register/login
Check first post for the code.
https://www.youtube.com/watch?v=9c-SY5lucac#
Can anyone help me i installed this system it is working very good but it isn't save stats.What should I do or where i did wrong ?
yankee yapmışsınya kardeşim sunucuna suan calısıyor gibi gözüküyo yeni versiyonu hemde
Quote from: h4fmaster on Jun 24, 2017, 05:43 AMyankee yapmışsınya kardeşim sunucuna suan calısıyor gibi gözüküyo yeni versiyonu hemde
Skor ve parayi kaydetmiyor/It didn't save stats of players(score,money etc.)
Quote from: Yankee on Jun 23, 2017, 10:39 PMCan anyone help me i installed this system it is working very good but it isn't save stats.What should I do or where i did wrong ?
Elaborate
çünkü sistem sadece kayıt/giriş üzerine kurulu oyuzden adam sadece kayıtla girisişi koymus sadece onları kendin yapman gerek.İstersen sana bu konuda tavsiye verebilirim
@YankeeBecause the system is based on registration / login. Money etc. You need to do things yourself
Quote from: h4fmaster on Jun 24, 2017, 02:26 PMçünkü sistem sadece kayıt/giriş üzerine kurulu oyuzden adam sadece kayıtla girisişi koymus sadece onları kendin yapman gerek.İstersen sana bu konuda tavsiye verebilirim @Yankee
Because the system is based on registration / login. Money etc. You need to do things yourself
Neyse kendim ayrı bi sistem ekledim /hesap yazınca ini dosyasından okuyor tabi oyuna girdikten sonra her girişte /hesap yazmak gerekcek ama olsun :)
I make my own stats system :)
aynı işlemi yapabilirsin başka scriptlerden alıp kendi main.nut una koyup çalıştırabilirsin oluyor ben denedim bir kaçıyla
You can do the same thing you can get it from other scripts and put your own main.nut and try it,
Quote from: h4fmaster on Jun 24, 2017, 03:01 PMaynı işlemi yapabilirsin başka scriptlerden alıp kendi main.nut una koyup çalıştırabilirsin oluyor ben denedim bir kaçıyla
English please?
So I am too Dumb to ask this question anyway I wanna know Where should i add Client Side Scripts Provided I added them on main.nut & It Pop Up Error
Server does not exist
function Server::ServerData(stream)
Quote from: Terror_Styles on Jul 08, 2017, 11:12 AMSo I am too Dumb to ask this question anyway I wanna know Where should i add Client Side Scripts Provided I added them on main.nut & It Pop Up Error
Server does not exist
function Server::ServerData(stream)
use search button
Quote from: Terror_Styles on Jul 08, 2017, 11:12 AMSo I am too Dumb to ask this question anyway I wanna know Where should i add Client Side Scripts Provided I added them on main.nut & It Pop Up Error
Server does not exist
function Server::ServerData(stream)
Main.nut from script or client-side?
Quote from: Terror_Styles on Jul 08, 2017, 11:41 AMOk This Error has been fixed
Now Error is on this line
status[player.ID] = PlayerStats();
index Registered does not exist
Stick to play then.
I'm seriously just so annoyed by these low class retards. Thijn only told one person to "stick to playing". These genuine retards never learned something else but they sure learned this sentence and now just using it everywhere.
Get your shit together ffs, if you are so goddamn lazy to guide then don't bullshit about searching or not scripting. This guy is literally asking politely how to do this and infact it was hard for us to figure out client side mess as well so let someone help him properly rather you midgets coming here moaning.
Problem Solved
Sorry For Troubling You Guys As I am feeling ashamed! of my deeds!
Apology!
Guys Not Working For Me
Always Said Please Register.
/register no thing did
Quote from: Mahmoud Tornado on Aug 21, 2017, 04:21 PMGuys Not Working For Me
Always Said Please Register.
/register no thing did
Mahmoud, maybe you shouldn't work with this at your level of scripting. This is advanced, my friend.
Quote from: DarkRaZoR^ on Aug 21, 2017, 04:49 PMQuote from: Mahmoud Tornado on Aug 21, 2017, 04:21 PMGuys Not Working For Me
Always Said Please Register.
/register no thing did
Mahmoud, maybe you shouldn't work with this at your level of scripting. This is advanced, my friend.
I didn't understand any thing xD
WTF Any One tell me,
im download server side work but
clien side i am download for other main.nut and pleace thi main for store/script<main>
But i do /register or /login Not Work. :/ Ani One Help :v
I find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
Quote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never Never Never Never Never Understand Anithingggggggggggggggggggggggggggg
Quote from: [MCO]We3da on Nov 01, 2017, 08:12 PMQuote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never Never Never Never Never Understand Anithingggggggggggggggggggggggggggg
You'll. Once the 'bad' things happen.
https://www.w3schools.com/sql/sql_injection.asp
Quote from: [MCO]We3da on Nov 01, 2017, 08:12 PMQuote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never Never Never Never Never Understand Anithingggggggggggggggggggggggggggg
Please
@Xmair Give me Example Bro :(
Quote from: [MCO]We3da on Nov 02, 2017, 07:11 AMQuote from: [MCO]We3da on Nov 01, 2017, 08:12 PMQuote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never Never Never Never Never Understand Anithingggggggggggggggggggggggggggg
Please @Xmair Give me Example Bro :(
Imagine you have a command /gotoloc which executes the following query:
"SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'"
where locationName is a string input by the user in the gotoloc command. Imagine there's a bad guy who uses
/gotoloc '; DROP TABLE Accounts; instead of a location, this'll get executed:
"SELECT XYZ FROM Locations WHERE Name = ''; DROP TABLE Accounts;"
This'll ultimately execute both of the queries as there is a semicolon right after the SELECT query. To avoid this, you use
mysql_escape (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/mysql_escape_string) in mySQL and
escapeSQLString (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/escapeSQLString) in SQLite.
You must be using SQLite so I'm going to put on an example in which can be used by the default SQLite plugin for VCMP.
Instead of:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'" );Use:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + escapeSQLString( locationName ) + "'" );Simple, isn't it? I've tried my best to explain it as easy as I could, if you still don't get it, meh.
Quote from: Xmair on Nov 02, 2017, 09:09 AMQuote from: [MCO]We3da on Nov 02, 2017, 07:11 AMQuote from: [MCO]We3da on Nov 01, 2017, 08:12 PMQuote from: Shadow on Nov 01, 2017, 04:04 PMI find it admirable that you thought of escaping the strings before doing the select query but you should've also escaped the name in the update query. Otherwise, BAD things can happen...
I never Never Never Never Never Never Understand Anithingggggggggggggggggggggggggggg
Please @Xmair Give me Example Bro :(
Imagine you have a command /gotoloc which executes the following query:
"SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'"
where locationName is a string input by the user in the gotoloc command. Imagine there's a bad guy who uses /gotoloc '; DROP TABLE Accounts; instead of a location, this'll get executed:
"SELECT XYZ FROM Locations WHERE Name = ''; DROP TABLE Accounts;"
This'll ultimately execute both of the queries as there is a semicolon right after the SELECT query. To avoid this, you use mysql_escape (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/mysql_escape_string) in mySQL and escapeSQLString (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/escapeSQLString) in SQLite.
You must be using SQLite so I'm going to put on an example in which can be used by the default SQLite plugin for VCMP.
Instead of:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + locationName + "'" );
Use:
QuerySQL( database, "SELECT XYZ FROM Locations WHERE Name = '" + escapeSQLString( locationName ) + "'" );
Simple, isn't it? I've tried my best to explain it as easy as I could, if you still don't get it, meh.
@Xmair You Are Besstteeee ONe Help Me im Happyyyyyy And im Learned Now.
Thanks for helping my friend :D
guyz i am add cilent side its error showing
on end
Quote from: =RK=MarineForce on Dec 16, 2017, 04:06 PMguyz i am add cilent side its error showing
on end
Why not post the error instead of alerting us.
Luchgox give me script Thankx Goood Lucky Working
@Anik can you give it with whirlpool encryption
Quote from: Ali Ahmed on Jan 02, 2018, 11:16 AM@Anik can you give it with whirlpool encryption
He left vcmp.
http://forum.vc-mp.org/?topic=5382.msg38398#msg38398
Its Working ! ;D
link -> :-[ (https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2Fbbc5e2f90913c7f2768997cd0bd71c9a%2FPedo.rar&hash=c1dbfef44cb1f57c4dac47a78cf0cab9b50ac0ae) (http://files.thijn.ovh/download/bbc5e2f90913c7f2768997cd0bd71c9a/Pedo.rar)
Quote from: =RK=MarineForce on Jan 10, 2018, 05:14 PMIts Working ! ;D
link -> :-[ (https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2Fbbc5e2f90913c7f2768997cd0bd71c9a%2FPedo.rar&hash=c1dbfef44cb1f57c4dac47a78cf0cab9b50ac0ae) (http://files.thijn.ovh/download/bbc5e2f90913c7f2768997cd0bd71c9a/Pedo.rar)
nice virus marine
Banned soon
I dont know why but I am getting a error " The index Stream does not exist" help pls :D
Quote from: Helathien on Jun 06, 2018, 03:56 PMI dont know why but I am getting a error " The index Stream does not exist" help pls :D
You need to update your server version from rel003 to rel004.