Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: kennedyarz on Mar 19, 2016, 01:11 AM

Title: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 01:11 AM
not hear but every time I ask for help always get a negative response departe scripters I would like to at least give me the registration function for my server because it makes me much needed, this time I would like that was not as usual
Title: Re: funcion /register help me
Post by: KAKAN on Mar 19, 2016, 02:38 AM
Wrong place to ask. And also, please try searching before asking.
Title: Re: funcion /register help me
Post by: MatheuS on Mar 19, 2016, 08:06 AM
You posted this in the wrong area
Title: Re: funcion /register help me
Post by: Decent_946 on Mar 19, 2016, 08:15 AM
http://forum.vc-mp.org/?topic=224.msg1162#msg1162
^^^
use fuzzie's account system. it has the function you are searching for. ;)
hope you'll be able to understand that system.
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 11:36 AM

one more question , the plugin have to download the form in this example : sqlite04rel32.so while the sqlite04rel32.dll
Title: Re: funcion /register help me
Post by: KAKAN on Mar 19, 2016, 11:41 AM
Quote from: kennedyarz on Mar 19, 2016, 11:36 AMone more question , the plugin have to download the form in this example : sqlite04rel32.so while the sqlite04rel32.dll
Depends on your OS. If it's Linux, give a try to .so, if it doesn't work, compile it yourself :D
If your OS is Windows, then download the .dll file. Also, it depends on your server/PC architecture.
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 11:47 AM
my pc is windows XP and I have a 32 , but not every time I add a new plugin system empIoys with the error of the plugin , then I have to do ? just install the " dll" file?
Title: Re: funcion /register help me
Post by: KAKAN on Mar 19, 2016, 11:50 AM
Quote from: kennedyarz on Mar 19, 2016, 11:47 AMmy pc is windows XP and I have a 32 , but not every time I add a new plugin system empIoys with the error of the plugin , then I have to do ? just install the " dll" file?
What's the error? What do you mean by installing a "dll" file? They're compiled scripts, you can't "install" them.
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 12:00 PM
I mean every time I want to put a plug in plugin folder and then placed in settings, when I start server.exe this tells me errors when loading plugin
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 12:10 PM
as you can be placed in contact with you forever? THROUGH  #kakan @ LUNET?
Title: Re: funcion /register help me
Post by: MaTaDeToR on Mar 19, 2016, 12:14 PM
Quote from: kennedyarz on Mar 19, 2016, 12:00 PMI mean every time I want to put a plug in plugin folder and then placed in settings, when I start server.exe this tells me errors when loading plugin
If, you are using 32 Bit, download the dll plugins of 86x! place them simply in the "Plugin" folder, and name them whatever they are....
Example :
Download sqlite04rel32.dll plugin! place it to "Plugins" in the server.cfg then right it down in the Server.cfg "plugins sqlite04rel32.dll" and got loaded.
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 12:28 PM
ok and place the plug and the perfect position but now I have a problem with onscriptload says


AN ERROR HAS ocurred [canon open the file]
CallStack
* FUNTION [onscripload ()] scripts / main.nut line [28]
LOCALS
[This] TABLE

and the role I have in the bone dictates this:

{
   dofile( "fas_v3_mysql.nut" );
   
   pstats <- array( GetMaxPlayers(), null );
   sqliteDB <- mysql_connect( "server", "user", "password", "database" );
   
   print( "Fuzzie's Account System v3 - MySQL variant has successfully loaded..." );
}
Title: Re: funcion /register help me
Post by: KAKAN on Mar 19, 2016, 01:52 PM
That means the fas_v3_mysql.nut doesn't exist.
Title: Re: funcion /register help me
Post by: MacTavish on Mar 19, 2016, 02:03 PM
you better take SQLite based script instead Mysql i doubt that your next error will be about DB after fixing this
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 19, 2016, 04:24 PM
help online for anydesk pls
Title: Re: funcion /register help me
Post by: Mötley on Mar 19, 2016, 07:48 PM
So what are you using now? Fuzzie's account system?

either way if you don't know that style of scripting it is good to learn.

If you don't know how to script you will probably be digging threw all the release everything in general! If this is the case I would suggest for you to name a preference. lucky the community was capable of helping me get my preferences going on account system wise.

But if you do happen to go a different route as I did all I can say is "I HOPE YOU KNOW HOW TO SCRIPT AS RESOURCES ARE LIMITED FOR EVEN MYSELF"

But I know how to script I just get stuck on the dumb stuff luckily.

So If you have any preference please state them before you get yourself deep into your scripting. Just trying to point you in a good direction :D
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 20, 2016, 01:07 AM
a question when I add a script. Kollektives nut file, I have to put that in the main.nut upload with onscriptload while placing it in server conf well as this the bone main.nut the the game mode?

kakan hear and if I have it there in the script function
Title: Re: funcion /register help me
Post by: KAKAN on Mar 20, 2016, 11:46 AM
Quote from: kennedyarz on Mar 20, 2016, 01:07 AMa question when I add a script. Kollektives nut file, I have to put that in the main.nut upload with onscriptload while placing it in server conf well as this the bone main.nut the the game mode?

kakan hear and if I have it there in the script function
Sorry, but I can't understand :(
Title: Re: funcion /register help me
Post by: MacTavish on Mar 20, 2016, 02:31 PM
@kennedyarz main.nut is the main file of server and it is also the sqgamemode so load main.nut from server.cfg not server.conf and for other .nut files use this in onScriptLoaddofile("YYourFileName.nut", true);
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 21, 2016, 01:47 AM
ok thx i prove
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 21, 2016, 08:00 PM

A QUESTION Where Placing the database .sqlite?
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 21, 2016, 08:19 PM
OnScripLoad the function is what is not bad but there is an error with that, please help me salucionarlo for this charge.

function onScriptLoad()
{
   dofile( "fas_v3_sqlite.nut", true);
   
   pstats <- array( GetMaxPlayers(), null );
   sqliteDB <- ConnectSQL( "database.sqlite" );
   
   print( "Fuzzie's Account System v3 - SQLite variant has successfully loaded..." );
}
Title: Re: funcion /register help me
Post by: Thijn on Mar 21, 2016, 08:21 PM
Please post the error..
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 21, 2016, 08:27 PM
AN ERROR HAS ocurred [canon open the file]
CallStack
* FUNTION [onscripload ()] scripts / main.nut line [28]
LOCALS
[This] TABLE

one scripter told me was that there was this very wrong but I have it there in the script folder
Title: Re: funcion /register help me
Post by: Thijn on Mar 21, 2016, 08:35 PM
Like he said, the file doesn't exist. Show us a screenshot of your server folder.
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 21, 2016, 08:46 PM
are you really sure what that says? I I can spend my folder script for yourself to see.
Title: Re: funcion /register help me
Post by: KAKAN on Mar 22, 2016, 06:40 AM
Quote from: kennedyarz on Mar 21, 2016, 08:46 PMare you really sure what that says? I I can spend my folder script for yourself to see.
Quote from: Thijn on Mar 21, 2016, 08:35 PM
Like he said, the file doesn't exist. Show us a screenshot of your server folder.

Title: Re: funcion /register help me
Post by: Coolkid on Mar 22, 2016, 11:10 AM
In which folder is your main.nut stored is the name of main script main.nut or any thing give if your acrit is not in script folder move it to script folder and rename it to main.nut if it's name is anything else or in server.cfg name the script name and in which loc it is if it is in scripts folder Scripts/main.nut
Title: Re: funcion /register help me
Post by: MacTavish on Mar 22, 2016, 01:47 PM
Quote from: WrostKid on Mar 22, 2016, 11:10 AMIn which folder is your main.nut stored is the name of main script main.nut or any thing give if your acrit is not in script folder move it to script folder and rename it to main.nut if it's name is anything else or in server.cfg name the script name and in which loc it is if it is in scripts folder Scripts/main.nut

Its not about main.nut he haven't placed Fuzzie's nut in right place
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 22, 2016, 02:07 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs2.subirimagenes.com%2Fotros%2Fprevio%2Fthump_9546084lo2.jpg&hash=2eb46a34404a9b2d40f37fc04da391560385b12e)
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 22, 2016, 02:08 PM
no exist?
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 22, 2016, 02:18 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs2.subirimagenes.com%2Fotros%2Fprevio%2Fthump_9546087lol3.jpg&hash=f1318592e2de0c4bd687cf0e79394b333f710f6c)
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs2.subirimagenes.com%2Fotros%2Fprevio%2Fthump_9546096lol4.jpg&hash=255b43d86c48d580f44b5f175cecd8d5ffb6e368)(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs2.subirimagenes.com%2Fotros%2Fprevio%2Fthump_9546097lol5.jpg&hash=f58dba5f941412035ed8b5674d1628397698b197)(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fs2.subirimagenes.com%2Fotros%2Fprevio%2Fthump_9546098lol6.jpg&hash=76165128af0b96c6e99f2a3b008392d5062d04fb)
Title: Re: funcion /register help me
Post by: MacTavish on Mar 22, 2016, 02:27 PM
Boss change dofile( "fas_v3_sqlite.nut", true); to dofile( "scripts/fas_v3_sqlite.nut", true);
Title: Re: funcion /register help me
Post by: Mötley on Mar 22, 2016, 05:45 PM
Yes @Kusanagi

in your server.cfg you should also do something like this
sqgamemode scripts/Main/main.nutand in your main.nut you should do something like this
const Path = "scripts/Main/"; **maybe you already have that
^^^^
This can be repeated into different locations
Example: At this time I have been scripting inside my Main.nut only but this could be used in multiple ways
*Many ways
I could have the directory start as
const Path = "Scripts/"; **maybe you already have that
and have that script to direct the many differnt locations you will just need to make different names instead of just Path
const Path = "Scripts/Accounts/"; **and create constant paths like a folder for Accounts etc. This way i can separate the data into separate folders. Accounts/Players commands/Admin commands/many ways to separate your data. But this can be rather complex to get this correct but when achieved it is worth it!!
Title: Re: funcion /register help me
Post by: MacTavish on Mar 22, 2016, 06:41 PM
Quote from: Mr_Motley on Mar 22, 2016, 05:45 PMYes @Kusanagi

in your server.cfg you should also do something like this
sqgamemode scripts/Main/main.nutand in your main.nut you should do something like this
const Path = "scripts/Main/"; **maybe you already have that
^^^^
This can be repeated into different locations
Example: At this time I have been scripting inside my Main.nut only but this could be used in multiple ways
*Many ways
I could have the directory start as
const Path = "Scripts/"; **maybe you already have that
and have that script to direct the many differnt locations you will just need to make different names instead of just Path
const Path = "Scripts/Accounts/"; **and create constant paths like a folder for Accounts etc. This way i can separate the data into separate folders. Accounts/Players commands/Admin commands/many ways to separate your data. But this can be rather complex to get this correct but when achieved it is worth it!!

His main.nut location is fine except that fuzzies
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 22, 2016, 10:41 PM
not help online script no load
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 23, 2016, 09:12 PM
who could pass me the program to store account information
Title: Re: funcion /register help me
Post by: Mötley on Mar 23, 2016, 10:16 PM
http://forum.vc-mp.org/?topic=332.msg1922#msg1922

download that server there is a browser inside. It is missing the .dll type the name of the missing .dll and find it on a web-search and download it and add it in the same folder.

Also this is a good script as I have been studying it. so maybe you could combine your work with this server or just use it as examples.

Hope this is helpful
Title: Re: funcion /register help me
Post by: Thijn on Mar 24, 2016, 06:44 AM
Quote from: Mr_Motley on Mar 23, 2016, 10:16 PMdownload that server there is a browser inside. It is missing the .dll type the name of the missing .dll and find it on a web-search and download it and add it in the same folder.
Seriously, don't do this. If you're missing DLL files install the right redistributable.
Title: Re: funcion /register help me
Post by: Mötley on Mar 24, 2016, 06:50 AM
I just pointed out something I found on this site. I don't know much about the language he is learning and there really isn't any resources on this site as to where to get a browser so I attempted to help as no one will probably respond with an actual browser download,

Just attempting to help quickly
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 25, 2016, 12:40 AM
ya resuelto, lo que quiero ahora es saber como hacer para que cuando un jugador entre se mantenga freezado y con los comandos bloqueados para que a este solo se le permita hacer la accion ya sea registradose o loggeando en el servidor.
Title: Re: funcion /register help me
Post by: Mötley on Mar 25, 2016, 05:33 AM
Para lograr esto se necesita para conseguir la correcta construida en funciones como la función spawnscreen y crear un local de su función de inicio de sesión. decir quizá locales conectados = (alguna función de inicio de sesión de la suya);

entonces

if (!registrada) MessagePlayer ("Debe hacer login / registro) return 0;
Aparte de eso me beleave que lo es.
 :)
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 25, 2016, 04:43 PM
expliquese mejor, no le entiendo. si estoy pidiendo esa parte alguno me podria mejor pasar esa funcion porque entonces para que lo publico? no me ayuda con eso.
Title: Re: funcion /register help me
Post by: Mötley on Mar 25, 2016, 05:34 PM
Try something like this

**Untested

function onPlayerRequestClass( Player, classID, skin, team )
{
//Register needs to be you register read
//Logged needs to be you login read
local Register = Register( Player ), Logged = Logged( Player );

//Hear we will force a player to login or register
if ( ( !Register ) && ( !Logged ) ) MessagePlayer("You must login/register") return 0;
eles if ( ( Register ) && ( Logged ) ) && (!Player.Spawned) Player.Spawn();
}
Title: Re: funcion /register help me
Post by: Xmair on Mar 25, 2016, 05:54 PM
You're checking if the player is spawned on player class....
Title: Re: funcion /register help me
Post by: Mötley on Mar 25, 2016, 05:54 PM
If registered and logged spawn that player

*Edit
Also what happens if it happens more than once? as in what if it keeps spawning the player on lag and causes server to act funky? just curious. I only added that as a check so it wont double/triple spawn

maybe you are correct and what i said is correct in your logic as if you just make the call once that is all that is needed?
Title: Re: funcion /register help me
Post by: kennedyarz on Mar 27, 2016, 09:16 PM
eso no sirve, ademas yo le estoy pidiendo una función la cual mantenga Frezado un jugador que acaba de ingresar, para que los comandos se le bloqueen y este no pueda aparecer hasta que no coloque contraseña correcta , esto es para que otros jugadores no puedan ingresar en cuentas de otros..
Title: Re: funcion /register help me
Post by: Diamond on Mar 28, 2016, 08:57 AM
lol , su hombre obvio, hay función SHA256 para cifrar la contraseña del jugador .
Title: Re: funcion /register help me
Post by: Mötley on Mar 28, 2016, 03:05 PM
Btw the method i posted is wrong! needs to return the spawn screen to zero and if logged in or just registered player.Spawn(); in the register/login function.