[Pedido] Verificar mostrar dialog x - 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: [Pedido] Verificar mostrar dialog x (
/showthread.php?tid=588726)
Verificar mostrar dialog x -
Izaque1998 - 11.09.2015
Bom galera queria saber como fazer uma verifiзгo antes de mostrar a dialog do login tipo verificar se a uma conta registrada com o nick do player se tiver mostrar a dialog do login caso contrario mostrar a dialog de registro.
Se alguйm poder me ajudar com isso fico grato.
Re: Verificar mostrar dialog x -
zPain - 11.09.2015
Exemplo:
PHP код:
public OnPlayerConnect(playerid) {
static name[24], file[64];
GetPlayerName(playerid, name, sizeof name);
format(file, sizeof file, "Players/%s.ini", name);
if(fexist(file)) {
// exibir dialog de login
}
else {
// exibir dialog de registro
}
return 1;
}
Re: Verificar mostrar dialog x -
Izaque1998 - 11.09.2015
Quote:
Originally Posted by zPain
Exemplo:
PHP код:
public OnPlayerConnect(playerid) {
static name[24], file[64];
GetPlayerName(playerid, name, sizeof name);
format(file, sizeof file, "Players/%s.ini", name);
if(fexist(file)) {
// exibir dialog de login
}
else {
// exibir dialog de registro
}
return 1;
}
|
Vlw man seu exemplo funcionou perfeitamente, nem sei como te agradecer. +rep
Re: Verificar mostrar dialog x -
Sennior - 12.09.2015
Uma pergunta aproveitando o tуpico, fexist e DOF2_FileExists й a mesma coisa? Nunca usei o fexist em DOF2 '-'
Re: Verificar mostrar dialog x -
zPain - 12.09.2015
Quote:
Originally Posted by Sennior
Uma pergunta aproveitando o tуpico, fexist e DOF2_FileExists й a mesma coisa? Nunca usei o fexist em DOF2 '-'
|
Veja o cуdigo da include DOF2:
PHP код:
#define DOF2_FileExists \
fexist