SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/06/2018, 01:55 PM   #1
TechSil
Little Clucker
 
TechSil's Avatar
 
Join Date: May 2018
Location: Karlsruhe
Posts: 19
Reputation: 0
Question Register

Hi, i dont know how to add something like "Gender" in register/login.. And please dont post me or say you have tutorial or something like that.. because i still dont get it how to add where put stuff and like that. if you have some opinon how where i will be very grateful
TechSil is offline   Reply With Quote
Old 01/06/2018, 02:30 PM   #2
Sithis
Gangsta
 
Join Date: Mar 2013
Location: the Netherlands
Posts: 887
Reputation: 79
Default Re: Register

Go check this out: https://www.youtube.com/watch?v=7mpYjz-tbiQ
__________________
Developer and owner of https://trinityrpg.com
Sithis is offline   Reply With Quote
Old 01/06/2018, 02:42 PM   #3
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,268
Reputation: 525
Default Re: Register

Quote:
Originally Posted by TechSil View Post
please dont post me or say you have tutorial or something like that.. because i still dont get it how to add where put stuff and like that.
If that's the case, then programming maybe isn't for you... There's a LOT of reading and knowledge goes into this.
Sew_Sumi is offline   Reply With Quote
Old 01/06/2018, 02:59 PM   #4
TheOmnitrix
Little Clucker
 
TheOmnitrix's Avatar
 
Join Date: May 2018
Location: Narnia.
Posts: 16
Reputation: 1
Default Re: Register

Quote:
Originally Posted by TechSil View Post
Hi, i dont know how to add something like "Gender" in register/login.. And please dont post me or say you have tutorial or something like that.. because i still dont get it how to add where put stuff and like that. if you have some opinon how where i will be very grateful
Saved system? if it's YSI, it's like that.

Code:
#define DIALOG_SEX (1)//change it to a number that is not in use


enum pInfo

pSex

};
new user[MAX_PLAYERS][pInfo];

//You go where you have your INI_Int

INI_Int("Sexo", user[playerid][jSexo]);

//You go where you have your  INI_WriteInt
INI_WriteInt(File, "Sexo", user[playerid][pSex]);


// Go to your Data users

user[playerid][pSex] = 0;


//You paste this in the previous dialog

ShowPlayerDialog(playerid, D_SEXO, DIALOG_STYLE_MSGBOX, "Sex", ¿What is the sex of your charactere?", "Male", "Female");

public OnDialogResponse ( playerid, dialogid, response, listitem, inputtext [ ] ) 
{ 
		if(dialogid == DIALOG_SEX)
			{
				if (response == 1) {
					user[playerid][jSeo] = 1;
				} else {
					user[playerid][jSex] = 2;
				}
			}
 
    return  0 ;
}
__________________

Last edited by TheOmnitrix; 01/06/2018 at 04:37 PM.
TheOmnitrix is offline   Reply With Quote
Old 01/06/2018, 05:39 PM   #5
TechSil
Little Clucker
 
TechSil's Avatar
 
Join Date: May 2018
Location: Karlsruhe
Posts: 19
Reputation: 0
Default Re: Register

Quote:
Originally Posted by TheOmnitrix View Post
Saved system? if it's YSI, it's like that.

Code:
#define DIALOG_SEX (1)//change it to a number that is not in use


enum pInfo

pSex

};
new user[MAX_PLAYERS][pInfo];

//You go where you have your INI_Int

INI_Int("Sexo", user[playerid][jSexo]);

//You go where you have your  INI_WriteInt
INI_WriteInt(File, "Sexo", user[playerid][pSex]);


// Go to your Data users

user[playerid][pSex] = 0;


//You paste this in the previous dialog

ShowPlayerDialog(playerid, D_SEXO, DIALOG_STYLE_MSGBOX, "Sex", ¿What is the sex of your charactere?", "Male", "Female");

public OnDialogResponse ( playerid, dialogid, response, listitem, inputtext [ ] ) 
{ 
		if(dialogid == DIALOG_SEX)
			{
				if (response == 1) {
					user[playerid][jSeo] = 1;
				} else {
					user[playerid][jSex] = 2;
				}
			}
 
    return  0 ;
}
Ty very much also i have one more question what is better and easy sqlite or mysql ?
TechSil is offline   Reply With Quote
Old 01/06/2018, 05:43 PM   #6
GTLS
High-roller
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 1,044
Reputation: 115
Default Re: Register

both are equally to learn. For bigger comunites, MySQL is suggested while SQLite is inbuild with PAWNO. SQLIte does not need any server to use while for MySQL you will neeed a MySQL server. I guess SQLite's syntax is a lil bit easy than MySQL.
__________________

I don't help for rep. I help cuz I was helped in the past.


Retired from SAMP Scene. Might open SAMP Forums once in a while.

Some treats for ya. Click em
Basic House System
Simple Speedo
Base Login/Register Script

GTLS is offline   Reply With Quote
Old 01/06/2018, 10:53 PM   #7
TechSil
Little Clucker
 
TechSil's Avatar
 
Join Date: May 2018
Location: Karlsruhe
Posts: 19
Reputation: 0
Default Re: Register

Quote:
Originally Posted by GTLS View Post
both are equally to learn. For bigger comunites, MySQL is suggested while SQLite is inbuild with PAWNO. SQLIte does not need any server to use while for MySQL you will neeed a MySQL server. I guess SQLite's syntax is a lil bit easy than MySQL.
Okay, tnx for information i will stay still on YSI
TechSil is offline   Reply With Quote
Old 01/06/2018, 11:45 PM   #8
Ada32
Huge Clucker
 
Ada32's Avatar
 
Join Date: Apr 2013
Posts: 293
Reputation: 62
Default Re: Register

the better question would be are you comfortable with learning 2 languages? sql is no pushover..(simple select/update/insert queries are piddling to its strength)

on another note, there are some really neat user systems available if you don't want to handle that level of complexity. namely bud by slice comes to mind or y_users/y_uvar by ******
Ada32 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
register with caracters and big letter register ShadowBlack Scripting Help 3 26/04/2018 05:01 PM
Help me please when connecting to server and register still want to register again mostafa7os Client Support 0 24/04/2016 02:33 AM
0.3z shots won't register/register wrongfully Some Tenth Bug Reports 1 19/01/2014 12:48 AM
Register system (/register [password]) xMrBlackburn Scripting Help 9 30/08/2013 10:55 PM


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.