Question
#6

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Make use of these following functions:

format
SendClientMessage
getdate
GetPlayerName

In the login function, fetch the last online date and format the message and send it. Save the date.
In the register function, fetch the date, the account name and password. Do the same as the login one, format it and send it. Save the date.

That's it.
as logic_ said
Код:
new name[25], string[100], day, month, year;
GetPlayerName(playerid, name, sizeof(name));
getdate(year, month, day);
format(string, 100,"Your registered account: <Name:%s><Password:%s>[Day:%d, Month:%d, Year:%d]", name,inputtext, day, month, year);
SendClientMessage(playerid, COLOR_YOUWANT, string);
On Your Dialog
PHP код:
switch(dialogid)
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"{FFC800}Toxic{00FF00}Freeroam","{FF4600}Написахте невалидна парола!.\n{00C3FF}Напишете паролата с която искате да се регистрирате.","Регистрация","Отказ");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_Close(File);
                
SpawnPlayer(playerid);
                new 
name[25], string[100], daymonthyear;
                
GetPlayerName(playeridnamesizeof(name));
                
getdate(yearmonthday);
                
format(string100,"Your registered account: <Name:%s><Password:%s>[Day:%d, Month:%d, Year:%d]"name,inputtextdaymonthyear);
                
SendClientMessage(playeridCOLOR_YOUWANTstring);
            }
        } 
you can make it like this hope its useful, enjoy.
Reply


Messages In This Thread
Question - by Lixyde - 22.03.2018, 18:50
Re: Question - by Dutheil - 22.03.2018, 18:52
Re: Question - by Logic_ - 22.03.2018, 18:54
Re: Question - by Lixyde - 22.03.2018, 19:03
Re: Question - by Logic_ - 22.03.2018, 19:08
Re: Question - by BulletRaja - 22.03.2018, 19:08
Re: Question - by PowerMwK - 22.03.2018, 19:09
Re: Question - by Maxandmov - 22.03.2018, 19:09
Re: Question - by Lixyde - 22.03.2018, 19:25
Re: Question - by Maxandmov - 22.03.2018, 19:30

Forum Jump:


Users browsing this thread: 2 Guest(s)