Hi guys!
I have been working on this for a while. It is my very own SQLite based (yup, I learned its basics :P) VCMP 0.4 script! Everything is very neatly organized, for example you use
player.Ban(admin, reason);
instead of
Ban(player, admin, reason);
and
Vehicles.Load()
instead of
LoadVehicles()
It contains a basic cmds and admin system, a name change system (im the first one to think of that, it updates your registeration :D), a classes (both script classes and the spawning classes) system and a vehicle system.
Link: https://www.mediafire.com/?hi9d42u7kb8w7hk
Default server.cfg file (you may need to edit modules but I did windows x32 (even though I have x64))
plugins announce04rel32 hashing04rel32 sockets04rel32 sqlite04rel32 squirrel04rel32
port 2194
sqgamemode main.s
Whats special?
Instead of /login and /register, it contains /signin and /signup.
Please notify me of any bugs. Excluding bugs like cockroaches etc.
Thanks!
Doomplay
:D :D
Just wondering, your signin amd signup thingy, i would like to know the proper syntax for it, i hope you havent implemented whaat it sounds to me cuz that will screw up one of my projects.
Other than that it seems a neat script.
Quote from: Doom_Killer on Mar 27, 2015, 04:52 AMDoomplay
:D :D
Just wondering, your signin amd signup thingy, i would like to know the proper syntax for it, i hope you havent implemented whaat it sounds to me cuz that will screw up one of my projects.
Other than that it seems a neat script.
/signin pass
/signup pass
I guess you are implementing something like email etc
Quote from: NE.CrystalBlue on Mar 27, 2015, 05:33 AMQuote from: Doom_Killer on Mar 27, 2015, 04:52 AMDoomplay
:D :D
Just wondering, your signin amd signup thingy, i would like to know the proper syntax for it, i hope you havent implemented whaat it sounds to me cuz that will screw up one of my projects.
Other than that it seems a neat script.
/signin pass
/signup pass
I guess you are implementing something like email etc
Ah alright thats good, and it has a little more than email
Quote from: NE.CrystalBlue on Mar 27, 2015, 04:19 AMWhats special?
Instead of /login and /register, it contains /signin and /signup.
I seriously hope you're not telling me that all you did was to rename the /login, /register and that's the only thing making your script special. Coz that can be done in 5 seconds with any usual script that implements them.
You are presenting me a gamemode. Do you know what that is? It's a new way of playing an existing game. Like the following for cs 1.6:
- Respawn
- Deathrun
- Hidenseek
- Jailbreak
- Zombie
- Gungame
- Surf
- Furien
- etc.
If your script doesn't implement anything similar to that. That means it's just another script with authentication built in and commands for banning some players.
Anyway, maybe I'm wrong and you did create a gamemode which could be fun. But if I use your script and I see my self playing the same old Vice City then I'll come at you with an axe or something.
Quote from: S.L.C on Mar 27, 2015, 08:03 AMQuote from: NE.CrystalBlue on Mar 27, 2015, 04:19 AMWhats special?
Instead of /login and /register, it contains /signin and /signup.
I seriously hope you're not telling me that all you did was to rename the /login, /register and that's the only thing making your script special. Coz that can be done in 5 seconds with any usual script that implements them.
You are presenting me a gamemode. Do you know what that is? It's a new way of playing an existing game. Like the following for cs 1.6:
- Respawn
- Deathrun
- Hidenseek
- Jailbreak
- Zombie
- Gungame
- Surf
- Furien
- etc.
If your script doesn't implement anything similar to that. That means it's just another script with authentication built in and commands for banning some players.
Anyway, maybe I'm wrong and you did create a gamemode which could be fun. But if I use your script and I see my self playing the same old Vice City then I'll come at you with an axe or something.
I just put that since when I was testing the script seby came to the server and told me its the first server to have signin and signup.
And I never said I invented a gamemode. I just made one.
Note: Afaik you dont have an axe.
Quote from: NE.CrystalBlue on Mar 27, 2015, 09:04 AMNote: Afaik you dont have an axe.
How can you be so sure?
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fcdn.meme.am%2Finstances%2F43091757.jpg&hash=68acb4ed0640f375e1c485eb50bd65e17e045059)
Quote from: NE.CrystalBlue on Mar 27, 2015, 09:04 AMI just put that since when I was testing the script seby came to the server and told me its the first server to have signin and signup.
I don't mean to sound like an English teacher here but since I do web designing,
Sign Up does not have the same terminology as
Register and the same goes for
Sign In and
Log In despite
Sign Up doing basically what
Register does (and the same goes for
Sign In and
Log In). Unless your script is going to feature some sort of news based feature I don't think you should change
Register and
Log In to
Sign Up and
Sign In because of the terminology and you the fact that
Register and
Log In has become a norm to the VC:MP community.
Quote from: Fuzzie on Mar 27, 2015, 11:35 AMQuote from: NE.CrystalBlue on Mar 27, 2015, 09:04 AMI just put that since when I was testing the script seby came to the server and told me its the first server to have signin and signup.
I don't mean to sound like an English teacher here but since I do web designing, Sign Up does not have the same terminology as Register and the same goes for Sign In and Log In despite Sign Up doing basically what Register does (and the same goes for Sign In and Log In). Unless your script is going to feature some sort of news based feature I don't think you should change Register and Log In to Sign Up and Sign In because of the terminology and you the fact that Register and Log In has become a norm to the VC:MP community.
But id like to use /signin and /signup since its ever so special :D
Quote from: NE.CrystalBlue on Mar 27, 2015, 06:14 PMQuote from: Fuzzie on Mar 27, 2015, 11:35 AMQuote from: NE.CrystalBlue on Mar 27, 2015, 09:04 AMI just put that since when I was testing the script seby came to the server and told me its the first server to have signin and signup.
I don't mean to sound like an English teacher here but since I do web designing, Sign Up does not have the same terminology as Register and the same goes for Sign In and Log In despite Sign Up doing basically what Register does (and the same goes for Sign In and Log In). Unless your script is going to feature some sort of news based feature I don't think you should change Register and Log In to Sign Up and Sign In because of the terminology and you the fact that Register and Log In has become a norm to the VC:MP community.
But id like to use /signin and /signup since its ever so special :D
Being special by renaming basic commands to something else will only cause confusion.
Being special is adding something new, something fun and interesting that no one has ever done yet.
That's what makes a script special, not renaming a command.
Quote from: Thijn on Mar 27, 2015, 07:30 PMQuote from: NE.CrystalBlue on Mar 27, 2015, 06:14 PMQuote from: Fuzzie on Mar 27, 2015, 11:35 AMQuote from: NE.CrystalBlue on Mar 27, 2015, 09:04 AMI just put that since when I was testing the script seby came to the server and told me its the first server to have signin and signup.
I don't mean to sound like an English teacher here but since I do web designing, Sign Up does not have the same terminology as Register and the same goes for Sign In and Log In despite Sign Up doing basically what Register does (and the same goes for Sign In and Log In). Unless your script is going to feature some sort of news based feature I don't think you should change Register and Log In to Sign Up and Sign In because of the terminology and you the fact that Register and Log In has become a norm to the VC:MP community.
But id like to use /signin and /signup since its ever so special :D
Being special by renaming basic commands to something else will only cause confusion.
Being special is adding something new, something fun and interesting that no one has ever done yet. That's what makes a script special, not renaming a command.
Don't worry, you can rename it back.
You're attempting to use the loop to go to next row while the query returns just a single row ( Function IsRegistered ) . It will not create any difference in result since there is no such row actually exist but its a waste of instruction . Use ColumnData handler directly
with the complement ! .
You made custom count function which loops through the table to count the records . SQL has an inbuilt count function and is roughly 4.5x faster than loop according to my tests . This might be attributed to the fact that SQL count performs just index scanning regardless of the data that index contains .
Quote from: Kratos_ on Mar 28, 2015, 05:08 AMYou're attempting to use the loop to go to next row while the query returns just a single row ( Function IsRegistered ) . It will not create any difference in result since there is no such row actually exist but its a waste of instruction . Use ColumnData handler directly
with the complement ! .
You made custom count function which loops through the table to count the records . SQL has an inbuilt count function and is roughly 4.5x faster than loop according to my tests . This might be attributed to the fact that SQL count performs just index scanning regardless of the data that index contains .
Yeah I noticed it when I was converting the script for my rlrp. Fixed function:
function CPlayer::IsRegistered()
{
local c = 0, q = ::Sqlite.Query("select * from players where lcname='" + Name.tolower() + "'");
if (::GetSQLColumnData(q, 0)) c = 1;
::FreeSQLQuery(q);
return c;
}
And I dont know how to use the sqlite count in vcmp.
Quote from: NE.CrystalBlue on Mar 28, 2015, 05:56 AMAnd I dont know how to use the sqlite count in vcmp.
function Count()
{
local q = QuerySQL(db, "select COUNT(id) from vehicles"); // Scanning the index in table vehicles & creating a virtual table with a single column & ofcourse single row
local z = GetSQLColumnData( q, 0 ); // Getting that single cell by column handler
FreeSQLQuery(q); // Freeing up the query
return z;
}
Quote from: Kratos_ on Mar 28, 2015, 06:13 AMQuote from: NE.CrystalBlue on Mar 28, 2015, 05:56 AMAnd I dont know how to use the sqlite count in vcmp.
function Count()
{
local q = QuerySQL(db, "select COUNT(id) from vehicles"); // Scanning the index in table vehicles & creating a virtual table with a single column & ofcourse single row
local z = GetSQLColumnData( q, 0 ); // Getting that single cell by column handler
FreeSQLQuery(q); // Freeing up the query
return z;
}
Thanks
and you can also use LOWER to get ride of that extra column in you table for that lcname (lower-case name)
SELECT this,this1,this2 WHERE LOWER(Name) = '"+Name.tolower()+"'
other then that good work.
and as kratos said try using built-in functions in SQLite (http://www.tutorialspoint.com/sqlite/sqlite_useful_functions.htm) instead of making them manually from squirrel. Tbh SQLite doesn't have much functions but mysql has tons (http://www.tutorialspoint.com/mysql/mysql-useful-functions.htm) of them try to work with mysql.
Quote from: Sk on Mar 28, 2015, 01:20 PMand you can also use LOWER to get ride of that extra column in you table for that lcname (lower-case name)
SELECT this,this1,this2 WHERE LOWER(Name) = '"+Name.tolower()+"'
other then that good work.
and as kratos said try using built-in functions in SQLite (http://www.tutorialspoint.com/sqlite/sqlite_useful_functions.htm) instead of making them manually from squirrel. Tbh SQLite doesn't have much functions but mysql has tons (http://www.tutorialspoint.com/mysql/mysql-useful-functions.htm) of them try to work with mysql.
Thanks! But these functions are too many to fix them now :(
If I release another script then I will use them and MySQL :)
Quote from: NE.CrystalBlue on Mar 29, 2015, 04:11 AMIf I release another script then I will use them and MySQL :)
MySQL might be a bit overkill for this script. Mainly because people wouldn't know to set it up (
the server i mean) or simply don't have access to one. Also because your code uses a database very lightly. And there's no need for something as heavy as MySQL.
Quote from: S.L.C on Mar 29, 2015, 04:14 AMQuote from: NE.CrystalBlue on Mar 29, 2015, 04:11 AMIf I release another script then I will use them and MySQL :)
MySQL might be a bit overkill for this script. Mainly because people wouldn't know to set it up (the server i mean) or simply don't have access to one. Also because your code uses a database very lightly. And there's no need for something as heavy as MySQL.
Mmm... Okay, maybe I will need to stick with SQLite.
For example. I could easily host a VC:MP server on a 128MB RAM server with just SQLite. But try installing MySQL and you'll begin to see how nasty that can be. IF you get to install MySQL on 128MB. On some linux distros you'll have to create the MySQL config in advance before installing the server because you need to disable InnoDB. Otherwise MySQL installation will fail because InnoDB will prevent the server from starting up with just 128MB. It's a whole mess. That's why I'm saying MySQL should be used only when necessary.
Quote from: Sk on Mar 28, 2015, 01:20 PMand you can also use LOWER to get ride of that extra column in you table for that lcname (lower-case name)
SELECT this,this1,this2 WHERE LOWER(Name) = '"+Name.tolower()+"'
other then that good work.
and as kratos said try using built-in functions in SQLite (http://www.tutorialspoint.com/sqlite/sqlite_useful_functions.htm) instead of making them manually from squirrel. Tbh SQLite doesn't have much functions but mysql has tons (http://www.tutorialspoint.com/mysql/mysql-useful-functions.htm) of them try to work with mysql.
Btw you forgot the from clause in select :P
select this,this1,this2 from players where lower(Name) = '"+Name.tolower()+"'
Quote from: NE.CrystalBlue on Mar 30, 2015, 05:31 AMQuote from: Sk on Mar 28, 2015, 01:20 PMand you can also use LOWER to get ride of that extra column in you table for that lcname (lower-case name)
SELECT this,this1,this2 WHERE LOWER(Name) = '"+Name.tolower()+"'
other then that good work.
and as kratos said try using built-in functions in SQLite (http://www.tutorialspoint.com/sqlite/sqlite_useful_functions.htm) instead of making them manually from squirrel. Tbh SQLite doesn't have much functions but mysql has tons (http://www.tutorialspoint.com/mysql/mysql-useful-functions.htm) of them try to work with mysql.
Btw you forgot the where clause in select :P
select this,this1,this2 from players where lower(Name) = '"+Name.tolower()+"'
hehe i guess thats what happen when you don't copy paste :P
Nice gamemode
Nice! script
where i add these files
Do u need to bump everywhere?
ONTOPIC: Download and run it
Please man, Update this link. Thanks.
Note: Not bad reply i need this script ;)
this script is giving me some errors.
tell me how i fix this..
Quote from: Mursaleen5544 on Mar 04, 2019, 05:30 PMthis script is giving me some errors.
tell me how i fix this..
We're not mind readers, please attach your error messages.
@draccThis kinda of Error im getting , now lemme tell how can i fix this .
https://i.imgur.com/HGWvf3S.png
Quote from: Mursaleen5544 on Mar 07, 2019, 05:54 PM@dracc
This kinda of Error im getting , now lemme tell how can i fix this .
https://i.imgur.com/HGWvf3S.png
Have you made any edits to your local copy of the script or is it bone stock?
Quote from: dracc on Mar 08, 2019, 01:20 PMQuote from: Mursaleen5544 on Mar 07, 2019, 05:54 PM@dracc
This kinda of Error im getting , now lemme tell how can i fix this .
https://i.imgur.com/HGWvf3S.png
No i didnt made any changes. it is stock script
Have you made any edits to your local copy of the script or is it bone stock?