PHP код:
if(strcmp(cmd, "/darvip", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1341)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Meses]");
return 1;
}
new para1;
new level;
new meses;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
meses = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Meses]");
return 1;
}
level = strval(tmp);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(level < 1)return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк nгo pode definir para 0 meses!");
format(string, sizeof string, "Vocк deu %d meses de VIP para %s", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof string, "Admin %s te deu %d meses de VIP com R$%d e %d Niveis, Aproveite Nossos beneficios!", sendername, level, 15000000*meses, 3*meses);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
VipsLog(string);
PlayerInfo[para1][pLevel] += 3*meses;
PlayerInfo[para1][pVIP] = 1;
GivePlayerMoney(para1, 15000000*meses);
ScoreLevel(para1);
PlayerInfo[para1][pDiaVIP] = day;
PlayerInfo[para1][pMesVIP] = month+level;
PlayerInfo[para1][pAnoVIP] = year;
if(PlayerInfo[para1][pMesVIP] > 12)
{
PlayerInfo[para1][pMesVIP] -= 12;
PlayerInfo[para1][pAnoVIP]++;
}
OnPlayerSave(para1);
}
}
}
return 1;
}
/2015 mas quando chega esta data o vip nгo acaba, alguйm poderia me ajudar?