[GAMEMODE] Doomplay match 1.0

Started by EK.IceFlake, Mar 27, 2015, 04:19 AM

Previous topic - Next topic

EK.IceFlake

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!

DizzasTeR

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.

EK.IceFlake

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

DizzasTeR

Quote from: NE.CrystalBlue on Mar 27, 2015, 05:33 AM
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

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.
.

EK.IceFlake

Quote from: S.L.C on Mar 27, 2015, 08:03 AM
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.
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.

.

.

Fuzzie

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.

EK.IceFlake

Quote from: Fuzzie on Mar 27, 2015, 11:35 AM
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.
But id like to use /signin and /signup since its ever so special :D

Thijn

Quote from: NE.CrystalBlue on Mar 27, 2015, 06:14 PM
Quote from: Fuzzie on Mar 27, 2015, 11:35 AM
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.
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.

EK.IceFlake

Quote from: Thijn on Mar 27, 2015, 07:30 PM
Quote from: NE.CrystalBlue on Mar 27, 2015, 06:14 PM
Quote from: Fuzzie on Mar 27, 2015, 11:35 AM
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.
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.

Kratos_


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 .
In the middle of chaos , lies opportunity.

EK.IceFlake

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.

Kratos_


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;
}
In the middle of chaos , lies opportunity.

EK.IceFlake

Quote from: Kratos_ on Mar 28, 2015, 06:13 AM
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;
}
Thanks