auto vip remove
#10

i need this code plz
i change it to this but i dont know how to off vip after 30.
and this is my setvip code:
PHP код:
CMD:setvip(playeridparams[])
{
    new 
victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], viplvlidtmp[128], name[MAX_PLAYER_NAME];
    if(
PlayerInfo[playerid][pAdmin] >= CmdsOptions[setvip] || IsPlayerAdmin(playerid))
    {
        if (
sscanf(params"ui"idviplvl)) return SendClientMessage(playeridCOLOR_RED"USAGE: /setvip [id] [Viplevel]");
        if (
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"[ERROR]:Invalid ID");
        if (
viplvl || viplvl 0) return SendClientMessage(playeridCOLOR_RED,"[ERROR]:Valid Vip Levels: 1-5!");
        
PlayerInfo[id][pVip] = viplvl;
        
GetPlayerName(idvictimnamesizeof(victimname));
        
GetPlayerName(playeridadminnamesizeof(adminname));
        
GetPlayerName(idnamesizeof(name));
        
format(tmpsizeof(tmp),"/Asystem/Users/%s.ini",name);
        new 
YearMonthDay;
        
getdate(YearMonthDay);
        
Day += 30;
        new 
INI:ini INI_Open(tmp);
        
INI_SetTag(ini,"data");
        
INI_WriteInt(ini,"Vipdays",Day);
        
INI_Close(ini);
        new 
str[128];
        
format(str,128,"Admin %s v has set %s [ID %d] vip level to %i",adminnameplayeridvictimnameidviplvl);
        
SendClientMessage(playerid,COLOR_BLUE,str);
        new 
string[128];
        
format(string,128,"Admin %s (id:%d) has set your vip level to %i",adminnameplayeridviplvl);
          
SendClientMessage(id,COLOR_BLUE,string);
        return 
1;
    }
    else return 
SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");

Reply


Messages In This Thread
auto vip remove - by GeneralAref - 26.12.2015, 08:24
Re: auto vip remove - by $Marco$ - 26.12.2015, 14:02
Re: auto vip remove - by GeneralAref - 26.12.2015, 19:18
Re: auto vip remove - by SaltySandy - 26.12.2015, 19:28
Re: auto vip remove - by AmigaBlizzard - 26.12.2015, 22:57
Re: auto vip remove - by GeneralAref - 27.12.2015, 07:36
Re: auto vip remove - by Ritzy2K - 27.12.2015, 07:40
Re: auto vip remove - by GeneralAref - 27.12.2015, 09:29
Re: auto vip remove - by GeneralAref - 27.12.2015, 16:03
Re: auto vip remove - by GeneralAref - 27.12.2015, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)