What if two person play on the same computer. Your implementation is very poor. I wouldn't bother to recommend your script to ANYONE.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: vito on Apr 15, 2016, 01:44 PMThis whole OOP thing is a bit off topic. Here is my opinion on this. While you can script without the need for OOP in VC:MP, that doesn't mean it's not needed. As a matter of fact, the only reason why OOP is not that prominent in VC:MP is down to the fact that the scripters themselves don't know how to take advantage of this to create bigger and better servers.Quote from: KAKAN on Apr 15, 2016, 12:33 PMThen what's OOP? Explain pl0x. I thought the initialized classes or objects were the OOP thingprivate and public methods, interfaces, inheritance, factories. a lot of stuff to organize code to be flexible.
actually it's not needed to vc-mp.
function onPlayerJoin( player )
{
Message(""+player.Name+" Connected");
local y = QuerySQL(DB, "SELECT Level FROM PlayerAccount WHERE Name='" + player.Name + "'" );
if ( y <= 0 ) MessagePlayer("Hello and welcome to the server. Please /register to register in the server", player);
else if ( y >= 0 ) MessagePlayer("Welcome Back. Please /login to continue", player);
}
QuerySQL(DB, "SELECT Level FROM PlayerAccount WHERE Name='" + player.Name + "'" );
function onPlayerPart( player, reason )
{
Message(""+player.Name+" left the server.");
SaveStats(player);
}
function SaveStats(player)
{
QuerySQL(DB, "UPDATE PlayerAccount SET Level=" + stats[ player.ID ].Level + "" );
}
else if (cmd == "register")
{
...
local Password = text;
local lvl = 1;
...
}
else if (cmd == "login")
{
...
local Pass = text;
...
}
class PlayerClass
{
Level = 0
}
Quote from: S.L.C on Aug 16, 2015, 02:10 PMIsn't LU a dead project ?LU is probably undergoing a phase VC:MP had when transitioning from 0.3 to 0.4.
Quote from: Thijn on Aug 16, 2015, 01:13 PMYou should teach yourself to spam CTRL+S like crazy when coding. You can probably not do it enough.I have an editor with auto-save but I still spam CTRL+S every time I finish one line of code.
Quote from: Ksna on Jul 11, 2015, 07:41 AMSorry for bumpSorry for the late reply. Thanks for the fix but the /register command and the files associated with it in the Sample Script folder are just a sample script and was not part of the main file in the first place. I wasn't expecting anyone to use the sample script as part of their script, hence the reason why I didn't bothered doing a full bug check.
Thanks Fuzzie ,
When a registered player join , he is able to register again if he is not automatically logged in.
Quote from: Stormeus on Jul 27, 2015, 09:09 AM... if your ping is low enough.Or high enough the rest doesn't get loaded.