[AJUDA] Data - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Data (
/showthread.php?tid=189537)
[AJUDA] Data -
TiagoPS - 12.11.2010
Iai Pessoal, alguem poderia me dizer como fazco um sistema de calendario, tipo meu aniversario й 30/02 e ese fica guardado em um arquivo junto ao player ai quando chegar esta data que o player logar ele receberб os parabйns automatico ?
nгo queria um tipo o do gf e muito complicado
sera que da de fazer com getdate ?
ah e mais uma coisa alguem poderia me ensinar a usar pvar

eu nгo sei
Re: [AJUDA] Data -
ipsBruno - 12.11.2010
Nгo Usando PVARs
pawn Код:
new TiagoPS[SLOTS];
TiagoPS[playerid] = 10;
Usando PVARs
pawn Код:
SetPVARInt(playerid,"TiagoPS",10);
Poupa mais linha e й mais otimizado.
Enquanto a dъvida й fбcil:
pawn Код:
stock SalvarDataAniver(playerid,dia,mes,ano)
{
new name[24], file[44];
GetPlayerName(playerid,name,24);
format(file, sizeof(file), "%s_Aniver",name);
if(fexist(file))
{
dini_IntSet(file,"Dia",dia);
dini_IntSet(file,"Mes",mes);
dini_IntSet(file,"Ano",ano);
}
return true;
}
stock GetarDataAniver(playerid)
{
new Year, Month, Day;
new name[24], file[44];
GetPlayerName(playerid,name,24);
format(file, sizeof(file), "%s_Aniver",name);
if(fexist(file))
{
getdate(Year, Month, Day);
if(dini_Int(file,"Dia") == Day && dini_Int(file,"Ano") == Year && dini_Int(file,"Mes") == Month)
{
GivePlayerMoney(playerid,99999999); // aniver
}
}
return true;
}
Agradecer nгo Custa,rs.
Re: [AJUDA] Data -
TiagoPS - 12.11.2010
DraKoN eu te amo ♥

eu nem sabi para q servia pvars

agora eu sei muito obrigadinho
Re: [AJUDA] Data -
ipsBruno - 12.11.2010
de nada qualquer coisa fala ae s2
Re: [AJUDA] Data -
TiagoPS - 12.11.2010
sу mais uma coisinha
como fasco para compara valores com pvar ?
nгo to ligando as coisas certo eu acho
Re: [AJUDA] Data -
roginho_97 - 12.11.2010
Sou burro, o que й Pvar?
Re: [AJUDA] Data -
[FeK]HigorOliver - 12.11.2010
Pvar e um pouco lenta.
Re: [AJUDA] Data -
zSuYaNw - 12.11.2010
Quote:
Originally Posted by roginho_97
Sou burro, o que й Pvar?
|
Pvar й player variavles, ou seja mesma coisa que new TImais[MAX_PLAYERS];