11.07.2014, 04:42
olб na Gamemode que tenho o vip expira na mesma data que setou Ex:
Eu dou o vip pro cara la agora ae a data de vencimento fica pro prуprio dia, ainda nгo entendeu?
Setei o vip do cara hoje dia 18/07/2014 com o vencimento pra daqui 2 meses
o vencimento deveria ficar por mais ou menos dia 18/09/2014 mais nгo fica pro mesmo dia 18/07/2014
eu creio que o erro pode estar nessa parte do meu comando /darvip:
Comando completo:
quem puder ajudar serei muito grato!
PS: Procurei no search alguma forma de resolver e nгo achei!
Eu dou o vip pro cara la agora ae a data de vencimento fica pro prуprio dia, ainda nгo entendeu?
Setei o vip do cara hoje dia 18/07/2014 com o vencimento pra daqui 2 meses
o vencimento deveria ficar por mais ou menos dia 18/09/2014 mais nгo fica pro mesmo dia 18/07/2014
eu creio que o erro pode estar nessa parte do meu comando /darvip:
pawn Код:
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof string, "Vocк deu VIP Nнvel %d para %s", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
PlayerInfo[para1][pVIP] = level;
new var03 = 0;
new Anov,Mesv,Diav;
getdate(Anov, Mesv, Diav);
BenefVips(level);
if(Diav == 31) Diav = 30 ;
if(Mesv == 12 && Anov == 2014) { Mesv = 1; Anov++;} else { Mesv++; }
if(level == 1)
{
pawn Код:
if(strcmp(cmd, "/darvip", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 9)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
VipVaga();
if(VagaSobrando == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvip primeiro.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel] [Quantidade de Meses]");
return 1;
}
new para1;
new level;
new mesesvip;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel] [Quantidade de Meses]");
return 1;
}
level = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel] [Quantidade de Meses]");
return 1;
}
mesesvip = strval(tmp);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof string, "Vocк deu VIP Nнvel %d para %s", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
gettime(hour,minute,second);
PlayerInfo[para1][pVIP] = level;
new var03 = 0;
new Anov,Mesv,Diav;
getdate(Anov, Mesv, Diav);
BenefVips(level);
if(Diav == 31) Diav = 30 ;
if(Mesv == 12 && Anov == 2014) { Mesv = 1; Anov++;} else { Mesv++; }
if(level == 1)
{
PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
SendClientMessage(para1, 0x06DEE2AA,"{06DEE2}Play Virtual City Liberaзгo de Vantagens Vips |{06DEE2}Play Virtual City");
format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername);
SendClientMessage(para1, 0x00eaffFF, string);
PlayerInfo[para1][pConta] += VipGrana;
PlayerInfo[playerid][pVIP] = 1;
format(gstring, sizeof(gstring), "** Foi Acrescentado + 1 respeito por Payday, e um Salario maior!!");
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Sua primeira Fatura do Vip Vence Dia %d/%d/%d, Meses Pagos: %d!", Diav,Mesv,Anov,mesesvip);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "**Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Mais informaзхes Visite: WWW.Br-VirtualCity.SampForum.Net");
SendClientMessage(para1, 0x00eaffFF, gstring);
SendClientMessage(para1, 0xBBFFBBFF,"** Conta Vip Bronze Ativada, Obrigado por nos Ajudar, Bom Jogo!");
}
else if(level == 2)
{
PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
SendClientMessage(para1, 0x06DEE2AA,"{06DEE2}Play Virtual City Liberaзгo de Vantagens Vips |{06DEE2}Play Virtual City");
PlayerInfo[para1][pConta] += VipGrana;
PlayerInfo[playerid][pVIP] = 2;
format(string, sizeof string, "Vocк recebeu SUPR-VIP Nнvel %d do admin %s", level, sendername);
SendClientMessage(para1, 0x00eaffFF, string);
format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Foi Acrescentado + 3 respeito por Payday, e um Salario maior!!");
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Sua primeira Fatura do Vip Vence Dia %d/%d/%d, Meses Pagos: %d!", Diav,Mesv,Anov,mesesvip);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Mais informaзхes Visite: WWW.Br-VirtualCity.SampForum.Net");
SendClientMessage(para1, 0x00eaffFF, gstring);
SendClientMessage(para1, 0xBBFFBBFF,"** Conta Vip Prata Ativada, Obrigado por nos Ajudar, Bom Jogo!");
}
else if(level == 3)
{
PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
SendClientMessage(para1, 0x06DEE2AA,"{06DEE2}Play Virtual City Liberaзгo de Vantagens Vips |{06DEE2}Play Virtual City");
PlayerInfo[para1][pConta] += VipGrana;
format(string, sizeof string, "Vocк ganhou VIP Ouro Nнvel %d do admin %s", level, sendername);
SendClientMessage(para1, 0x00eaffFF, string);
format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Foi Acrescentado + 5 respeito por Payday, e um Salario maior!!");
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Sua primeira Fatura do Vip Vence Dia %d/%d/%d, Meses Pagos: %d!", Diav,Mesv,Anov,mesesvip);
SendClientMessage(para1, 0x00eaffFF, gstring);
format(gstring, sizeof(gstring), "** Mais informaзхes Visite: WWW.Br-VirtualCity.SampForum.Net");
SendClientMessage(para1, 0x00eaffFF, gstring);
SendClientMessage(para1, 0xBBFFBBFF,"** Conta Vip Ouro Ativada, Obrigado por nos Ajudar, Bom Jogo!");
}
ScoreLevel(para1);
for(new i = 0; i < sizeof(VipInfo); i++)
{
if(strcmp(PlayerName(para1),VipInfo[i][vNick],true)==0)
{
VipInfo[i][vDia] = Diav;
VipInfo[i][vMes] = Mesv;
VipInfo[i][vAno] = Anov;
VipInfo[i][vMesesVIP] = mesesvip;
SaveVip();
var03 = 1;
break;
}
}
if(var03 == 0)
{
for(new i = 0; i < sizeof(VipInfo); i++)
{
if(strcmp("Ninguem",VipInfo[i][vNick],true)==0)
{
strmid(VipInfo[i][vNick], PlayerName(para1), 0, strlen(PlayerName(para1)), 255);
VipInfo[i][vDia] = Diav;
VipInfo[i][vMes] = Mesv;
VipInfo[i][vAno] = Anov;
VipInfo[i][vMesesVIP] = mesesvip;
break;
}
}
}
PlayerInfo[para1][pMesesVIP] = mesesvip;
SalvarPlayer(para1);
SaveVip();
}
}
}
return 1;
}
PS: Procurei no search alguma forma de resolver e nгo achei!