Help with vip system
#1

So i made this vip system but it keeps giving out free vips to everyplayer that comes online


The code i use to save the player stats below:
PHP код:
forward SaveChar(playerid);
public 
SaveChar(playerid)
{
       new 
str[60],year,month,day,hour,mins,sec;
    
getdate(yearmonthday);
    
gettime(hour,mins,sec);
    
format(str60,"%d/%d/%d at %d:%d:%d"day,month,year,hour,mins,sec);
       if(!
IsPlayerConnected(playerid)) return 1;
       new 
INI:ACCOUNT INI_Open(UserPath(playerid));
    
INI_SetTag(ACCOUNT,"data");
    
INI_WriteInt(ACCOUNT,"Level",pInfo[playerid][Admin]);
    
INI_WriteInt(ACCOUNT,"Cash",GetPlayerCash(playerid));
    
INI_WriteInt(ACCOUNT,"Kills",pInfo[playerid][Kills]);
    
INI_WriteInt(ACCOUNT,"Deaths",pInfo[playerid][Deaths]);
    
INI_WriteInt(ACCOUNT"Score",GetPlayerScore(playerid));
    
INI_WriteInt(ACCOUNT"Banned",pInfo[playerid][Banned]);
       
INI_WriteInt(ACCOUNT"VIP",pInfo[playerid][VIP]);
       
INI_WriteInt(ACCOUNT"VIPDay"pInfo[playerid][VIPDay]);
    
INI_WriteInt(ACCOUNT"VIPMonth",pInfo[playerid][VIPMonth]);
    
INI_WriteInt(ACCOUNT"VIPHour"pInfo[playerid][VIPHour]);
    
INI_WriteInt(ACCOUNT"VIPTemp"pInfo[playerid][VIPTemp]);
    
INI_WriteInt(ACCOUNT,"Hours",pInfo[playerid][Hours]);
    
INI_WriteInt(ACCOUNT,"Minutes",pInfo[playerid][Minutes]); 
    
INI_WriteInt(ACCOUNT"pMuted"pInfo[playerid][pMuted]);
       
INI_WriteString(ACCOUNT"LastSeen"str);
      
INI_Close(ACCOUNT);
    new 
string[100];
    
format(string100"%s's character has saved successfully."GetName(playerid));
    print(string);
    return 
1;

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: 1 Guest(s)