SA-MP Forums Archive
[Ajuda] Como salvo IP do Player com DOF2? - 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] Como salvo IP do Player com DOF2? (/showthread.php?tid=364523)



Como salvo IP do Player com DOF2? - [XPG]MarlonCS - 30.07.2012

Hein?

DOF2_SetInt nгo salva o IP corretamente.

Tipo:
pawn Код:
new pIP[32];
format(arquivo, sizeof arquivo, "/infos/%s.ini", pnome(playerid));
GetPlayerIP(playerid, pIP, sizeof pIP);
DOF2_SetInt(arquivo, "IP", pIP);
DOF2_SaveFile();
E para getar o IP?


Re: Como salvo IP do Player com DOF2? - BreakDriFT - 30.07.2012

String


Re: Como salvo IP do Player com DOF2? - PawnoBrasil[xPBx] - 30.07.2012

Use DOF2_SetString e DOF2_GetString


Re: Como salvo IP do Player com DOF2? - Abravanel - 30.07.2012

pawn Код:
DOF2_SetFloat(arquivo, "IP", pIP);
IP й uma float.

Код:
127. 0. 0.1



Re: Como salvo IP do Player com DOF2? - PawnoBrasil[xPBx] - 31.07.2012

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
pawn Код:
DOF2_SetFloat(arquivo, "IP", pIP);
IP й uma float.
Nгo й nгo!


Re: Como salvo IP do Player com DOF2? - ipsBruno - 31.07.2012

Quote:

DOF2_SetString(arquivo, "IP", pIP);

para salvar o ip do arquivo


Risos:
Quote:
Originally Posted by AFerreira
Посмотреть сообщение
pawn Код:
DOF2_SetFloat(arquivo, "IP", pIP);
IP й uma float.

Код:
127. 0. 0.1
@PawnoBrasil[xPBx] \/

Estude mais.



Re: Como salvo IP do Player com DOF2? - Abravanel - 31.07.2012

@ipsBruno
Estou errado?
SetString funciona, ele escreve o IP, porйm tambйm pode se usar Float.
Como por exemplo em um format:
pawn Код:
new ip[18], string[100];
GetPlayerIp(playerid, ip, sizeof ip);
format(string, sizeof string,"teste %f",ip);
'-'.


Re: Como salvo IP do Player com DOF2? - Victor' - 31.07.2012

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
pawn Код:
DOF2_SetFloat(arquivo, "IP", pIP);
IP й uma float.
Nгo, IP nгo й uma float e sim uma string!

#Tуpic
pawn Код:
new pIP[32];
GetPlayerIP(playerid, pIP, sizeof pIP);

format(arquivo, sizeof arquivo, "/infos/%s.ini", pnome(playerid));
DOF2_SetString(arquivo, "IP", pIP);

DOF2_SaveFile();
pawn Код:
format(arquivo, sizeof arquivo, "/infos/%s.ini", pnome(playerid));

new pIP[32];
format(pIP, sizeof pIP, "%s", DOF2_GetString(arquivo, "IP"));



Re: Como salvo IP do Player com DOF2? - ipsBruno - 31.07.2012

Quote:
Originally Posted by AFerreira
Посмотреть сообщение
@ipsBruno
Estou errado?
SetString funciona, ele escreve o IP, porйm tambйm pode se usar Float.
Como por exemplo em um format:
pawn Код:
new ip[18], string[100];
GetPlayerIp(playerid, ip, sizeof ip);
format(string, sizeof string,"teste %f",ip);
'-'.
Estб bastante errado, e nгo й a primeira vez que falam isto. Desde quanto um nъmero decimal tem tantos pontos?

Quote:

NUMERO.PARTEDECIMAL

Nгo existe mais que isto, vocк estб errado. Falta reforзar a matemбtica lуgica aн, hein.


Re: Como salvo IP do Player com DOF2? - Abravanel - 31.07.2012

oxi, estou errado mesmo :/
Obrigado por me corrigir (: