[Ajuda] Como salvo IP do Player com DOF2?
#1

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?
Reply
#2

String
Reply
#3

Use DOF2_SetString e DOF2_GetString
Reply
#4

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

Код:
127. 0. 0.1
Reply
#5

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

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.
Reply
#7

@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);
'-'.
Reply
#8

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"));
Reply
#9

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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)