PDA

View Full Version : Register


TechSil
01/06/2018, 12:55 PM
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 :)

Sithis
01/06/2018, 01:30 PM
Go check this out: https://www.youtube.com/watch?v=7mpYjz-tbiQ

Sew_Sumi
01/06/2018, 01:42 PM
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.

TheOmnitrix
01/06/2018, 01:59 PM
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.



#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 ;
}

TechSil
01/06/2018, 04:39 PM
Saved system? if it's YSI, it's like that.



#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 ?

GTLS
01/06/2018, 04:43 PM
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.

TechSil
01/06/2018, 09:53 PM
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

Ada32
01/06/2018, 10:45 PM
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 ******