Colocar Ultimo login do dono ... -
LucasTadeu - 02.03.2014
Olб gente eu tentei olhei em gm's mas nao achei tipo queria colocar ultimo login do dono no /infocasa :
PHP код:
if(strcmp(cmdtext, "/infocasa", true) == 0)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
for(new c = 0; c < MAX_CASAS; c++)
{
format(string, sizeof(string), "/Casas/casa%d.ini", c);
if(dini_Exists(string))
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ")))
{
format(STRX, sizeof(STRX), "~~~~~~~~~~~~~~~ Casa Nъmero: %d ~~~~~~~~~~~~~~~", c);
SendClientMessage(playerid, 0x836FFFAA, STRX);
format(STRX, sizeof(STRX), "* Dono: %s", dini_Get(string, "Dono"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "* Valor: R$%d", dini_Int(string,"Preco"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "* Interior da casa: %d", dini_Int(string,"Int"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "* Ultimo Login do Dono: %d", dini_Int(string,"NГO sei oque coloca aqui =/"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "~~~~~~~~~~~~~~~ Casa Nъmero: %d ~~~~~~~~~~~~~~~", c);
SendClientMessage(playerid, 0x836FFFAA, STRX);
}
else
{
SendClientMessage(playerid, Vermelho, "[INFO] Vocк nгo estб em uma casa.");
}
}
}
return 1;
}
Re: Colocar Ultimo login do dono ... -
Kuddy - 02.03.2014
Eu penso que vocк esteja procurando isso
https://sampforum.blast.hk/showthread.php?tid=254915
Re: Colocar Ultimo login do dono ... -
Gii - 02.03.2014
Bom, se o ъltimo login esta sendo salvo, ficaria algo mais ou menos assim:
pawn Код:
if ( !strcmp(cmdtext, "/infocasa")) {
for(new c = 0; c < MAX_CASAS; c++) {
format(string, sizeof(string), "/Casas/casa%d.ini", c);
if(dini_Exists(string)) {
if(IsPlayerInRangeOfPoint(playerid, 8.0, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ"))) {
format(STRX, sizeof(STRX), "~~~~~~~~~~~~~~~ Casa Nъmero: %d ~~~~~~~~~~~~~~~", c);
SendClientMessage(playerid, 0x836FFFAA, STRX);
format(STRX, sizeof(STRX), "* Dono: %s", dini_Get(string, "Dono"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "* Valor: R$%d", dini_Int(string,"Preco"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "* Interior da casa: %d", dini_Int(string,"Int"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
new local_conta[35];
format (local_conta, 35, "Contas/%s.ini", dini_Get(string, "Dono") );
format(STRX, sizeof(STRX), "* Ultimo Login do Dono: %s", dini_Get(local_conta,"UltimoLogin"));
SendClientMessage(playerid, 0xFFFFFFAA, STRX);
format(STRX, sizeof(STRX), "~~~~~~~~~~~~~~~ Casa Nъmero: %d ~~~~~~~~~~~~~~~", c);
SendClientMessage(playerid, 0x836FFFAA, STRX);
break;
}
else
return SendClientMessage(playerid, Vermelho, "[INFO] Vocк nгo estб em uma casa.");
}
}
return 1;
}
Caso nгo esteja sendo salvo:
pawn Код:
public OnPlayerSpawn(playerid) {
if ( GetPVarInt(playerid, "spawn") == 0 ) {
static
dia,
mes,
ano,
hora,
minuto,
segundo,
str_info[22],
nome[24],
local_conta[35]
;
GetPlayerName(playerid, nome, 24);
format (local_conta, 35, "Contas/%s.ini", nome);
getdate(ano, mes, dia);
gettime(hora, minuto, segundo);
format (str_info, 22, "%02d/%02d/%02d - %02d:%02d:%02d", dia, mes, ano, hora, minuto, segundo);
dini_Set(local_conta, "UltimoLogin", str_info);
SetPVarInt(playerid, "spawn", 456);
}
return 1;
}
Re: Colocar Ultimo login do dono ... -
LucasTadeu - 02.03.2014
Nгo deu =/ !
@EDIT
Eu coloquei no que esta salvando o Ultimo login do dono mas dai nao funciona o CMD /infocasa :/