21.03.2010, 19:08
Hello i allmost complete my dialog registration and login system but here is 1 problem
CODE:
this is my OnPlayerConnect, i want when player connect and he is not registered it will show him the dialog 1,and than when he is registered and when he come back it should show him dialog 2, but i make 1 mistake and i dont know where... so when player register its all ok it make a file with his name etc etc, BUT when he dissconect and come back it show him the same dialog ''1'' and he must ''register again'' but i want he should login if he is allready registered wtf i did wrong in the script ?
i hope i give enough informations,if not just tell me and i will post.
EDIT: and 1 more question how i can do those strings or what ever they are in dialogs visible ? %s,%d etc etc, i try this
but it wont show his name , i know i make it wrong and someone some months ago told me how to do this and i forget ^^
Ty For Any Help!
CODE:
Код:
public OnPlayerConnect(playerid) { new file[256]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(!dini_Exists(file)) { ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Rp Registration","Hello %s!\nYou are not registered on this server.\nso please enter the password in the box\nto register a new account!","Register","Cancel"); } else { ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Welcome back %s!Please type in your password!\nEnjoy","Login","Cancel"); return 1; } return 1; }
i hope i give enough informations,if not just tell me and i will post.
EDIT: and 1 more question how i can do those strings or what ever they are in dialogs visible ? %s,%d etc etc, i try this
Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Rp Registration","Hello %s!\nYou are not registered on this server.\nso please enter the password in the box\nto register a new account!","Register","Cancel");
Ty For Any Help!