Help with vip system
#3

PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",pInfo[playerid][Pass]);
    
INI_Int("Cash",pInfo[playerid][Cash]);
    
INI_Int("Level",pInfo[playerid][Admin]);
    
INI_Int("Kills",pInfo[playerid][Kills]);
    
INI_Int("Deaths",pInfo[playerid][Deaths]);
    
INI_Int("Score"pInfo[playerid][Score]);
    
INI_Int("Banned"pInfo[playerid][Banned]);
       
INI_Int("VIP"pInfo[playerid][VIP]);
       
INI_Int("VIPDay"pInfo[playerid][VIPDay]);
     
INI_Int("VIPMonth"pInfo[playerid][VIPMonth]);
     
INI_Int("VIPHour"pInfo[playerid][VIPHour]);
     
INI_Int("VIPTemp"pInfo[playerid][VIPTemp]);
    
INI_Int("Hours",pInfo[playerid][Hours]);
    
INI_Int("Minutes",pInfo[playerid][Minutes]);
    
INI_Int("pMuted",pInfo[playerid][pMuted]);
      return 
1;

PHP код:
  switch( dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                new 
pIP[16],year,month,day,hour,mins,sec,string[40],str[60];
                
getdate(yearmonthday);
                
gettime(hour,mins,sec);
                
format(string40,"%d/%d/%d at %d:%d:%d"day,month,year,hour,mins,sec);
                
format(str60,"%d/%d/%d at %d:%d:%d"day,month,year,hour,mins,sec);
                
GetPlayerIp(playerid,pIP,16);
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registration Process Error",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                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_WriteInt(File,"Hours",0);
                
INI_WriteInt(File,"Minutes",0); 
                
INI_WriteString(File"RegisteredOn"string);
                
INI_WriteString(File"RegisteredIP"pIP);
                
INI_WriteString(File"LastLoggedIP"pIP);
                
INI_Close(File);
                
pInfo[playerid][Hours] =0;
                
pInfo[playerid][Minutes] =0;
                
Logged[playerid] = 1;
                
SetPlayerPos(playerid,1918.1643,1175.7311,18.2846);
                
SetPlayerCameraLookAt(playerid,1918.1643,1175.7311,18.2846);
                
SetPlayerCameraPos(playerid,1908.1575,1175.7079,18.2846);
                
SetPlayerFacingAngle(playerid,91.2061);
                  
SetTimerEx("pTime"1000true"i"playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Youv'e successfully registered this account in our Database","Ok","");
                   
format(astring125"Your Username has been created in our Database  |  UserName: %s  |  Password: %s"GetName(playerid), inputtext);
                return 
SendClientMessage(playerid,green,astring);
              }
        } 
Reply


Messages In This Thread
Help with vip system - by 1fret - 29.03.2017, 18:39
Re: Help with vip system - by AidanRO - 29.03.2017, 19:11
Re: Help with vip system - by 1fret - 29.03.2017, 19:26
Re: Help with vip system - by AidanRO - 29.03.2017, 19:27
Re: Help with vip system - by 1fret - 29.03.2017, 19:41
Re: Help with vip system - by 1fret - 30.03.2017, 14:35

Forum Jump:


Users browsing this thread: 2 Guest(s)