SA-MP Forums Archive
[Tutorial] How to make a register system - DIALOG - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make a register system - DIALOG (/showthread.php?tid=167937)

Pages: 1 2 3 4


Re: How to make a register system - DIALOG - Kaperstone - 18.06.2011

can i delete the 'p'? like replace from this: pScore,pCash,pAdminLevel
to this:Score,Cash,AdminLevel


Re: How to make a register system - DIALOG - Lorenc_ - 18.06.2011

Yes....


Re: How to make a register system - DIALOG - Remba031 - 20.06.2011

Quote:
Originally Posted by SpiderWalk
View Post
Code:
C:\Documents and Settings\Korisnik\Desktop\G.R.P\gamemodes\RCRP.pwn(409) : warning 219: local variable "tmp" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
how to fix this?
you have to delete the new tmp at line 409

EDIT: I have noticed that OnPlayerDisconnect you need to replace this
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
dini_IntSet(file, "Money",PlayerInfo[playerid][pMoney]);
with this:
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Money", GetPlayerMoney(playerid));

Because the money is not saving properly or it is not saving at all if you leave this.


Re: How to make a register system - DIALOG - Glorian - 30.06.2011

Code:
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 017: undefined symbol "gPlayerLogged"
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : warning 215: expression has no effect
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 001: expected token: ";", but found "]"
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : error 029: invalid expression, assumed zero
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(74) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Code:
new PlayerInfo[MAX_PLAYERS] [pInfo];
new gPlayerLogged[MAX_PLAYERS];
They are on the top.


Re: How to make a register system - DIALOG - Revolutionary Roleplay - 30.06.2011

Quote:
Originally Posted by Remba031
View Post
you have to delete the new tmp at line 409

EDIT: I have noticed that OnPlayerDisconnect you need to replace this
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
dini_IntSet(file, "Money",PlayerInfo[playerid][pMoney]);
with this:
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Money", GetPlayerMoney(playerid));

Because the money is not saving properly or it is not saving at all if you leave this.
It's not a good idea to rely on GetPlayerMoney, otherwise you will have no defense against players hacking money. Any time you want to edit the amount of money the player has, use the GivePlayerMoney function paired with setting the player's pMoney variable.

For example, if you wanted to give the play $500 you would:

GivePlayerMoney(playerid, 500);
PlayerInfo[playerid][Money] += 500;

That way, it won't require much effort to make an anti-hack system in the future where you can compare a player's client money amount to that of their variable.


Re: How to make a register system - DIALOG - Glorian - 30.06.2011

What's wrong with this code:

Code:
public OnPlayerConnect(playerid)
{
	gPlayerLogged[playerid] = 0;
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Khaos Register", "Welcome, You're not registered!, Register to play!", "Register", "Leave");
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Khaos Register", "Registered Complete. Now login", "Login", "Leave");
    }
}
I get this error:

Code:
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 017: undefined symbol "gPlayerLogged"
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : warning 215: expression has no effect
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 001: expected token: ";", but found "]"
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : error 029: invalid expression, assumed zero
C:\GTA Trucking Server\Test Script Server\gamemodes\khaos.pwn(80) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Code:
new PlayerInfo[MAX_PLAYERS] [pInfo];
new gPlayerLogged[MAX_PLAYERS];



Re: How to make a register system - DIALOG - romanzi - 15.07.2011

Help me!
I am paste is script and compiling on pawno (and writed in server.cfg). But script is don't work.
I am connect on server and spawn...register system is don't work (I am don't edit script)!!!


Re: How to make a register system - DIALOG - Kush - 15.07.2011

Can you be more specific? By the way, this was posted last year, why not upgrade to a newer system such as MySQL or Y_ini. Give SII a try


Re: How to make a register system - DIALOG - romanzi - 15.07.2011

1. Script in my server is don't work...As script is none.
2. I am don't edit script. It is as in post 1.
3. I don't can search other register system on SA-MP.
Help me.


Re: How to make a register system - DIALOG - Lorenc_ - 16.07.2011

1. This system is out dated!
2. This thread was created on 14/08/2010, 09:15 PM
3. This thread is worthless due to having dini as the file writer
4. Use the search function, it will find you something
5. LOOK AT THE GOD DAMN COMMENTS AND TRY FIND WHAT HELP YOU REQUESTED.


Re: How to make a register system - DIALOG - Cody9611 - 17.07.2011

How do I add commands like /aduty on, /aduty off [For admins] and /admins [for players]?


Re: How to make a register system - DIALOG - Lorenc_ - 19.07.2011

Quote:
Originally Posted by Cody9611
View Post
How do I add commands like /aduty on, /aduty off [For admins] and /admins [for players]?
I adore the search button, its free, and you should too!


Re: How to make a register system - DIALOG - Davz*|*Criss - 03.08.2011

Thanks very much mate.

But first admin command will be good for making more admin cmds in this register system.

Please support that.

Thanks

Davz~



Re: How to make a register system - DIALOG - Shockey HD - 03.08.2011

You guys know this is highly outdated? I suggest using Y_INI


Re : How to make a register system - DIALOG - Alvin007 - 29.10.2011

oh my gosh thank you , i won't use the registering system , but i will try to understand how to use dini thanks alot Lorenc_


Re: How to make a register system - DIALOG - Lorenc_ - 29.10.2011

No problem though you should really, really, really look at the SQLite tutorial I made, it's way better.


Re: How to make a register system - DIALOG - noder51 - 31.10.2011

i did all the steps... didnt save can you send me a tut or pm how to save it?


Re: How to make a register system - DIALOG - Prumpuz - 31.10.2011

Quote:
Originally Posted by noder51
View Post
i did all the steps... didnt save can you send me a tut or pm how to save it?
You created the folder "myserver" in scriptfiles?


Re: How to make a register system - DIALOG - Langley - 01.11.2011

This is a nice tutorial


Re: How to make a register system - DIALOG - Lorenc_ - 03.11.2011

New tutorial, now using up-to-date methods!

It's strongly suggested that everyone takes a look at this tutorial, help will be ignored and so will the thread be locked. The tutorial is clearly out-dated.