String In Player Array?
#1

Hmm, Idk if I'm doing smth wrong, or its not possible to happen with yIni
But however, I wanna save players ips in INI file, i already made everything, but it just saves the first nums of ip ex
"127.0.0.1" it saves "127" only
PHP код:
enum pInfo
{
    
pIP[16]

PHP код:
new PlayerInfo[MAX_PLAYERS][pInfo]; 
In LoadUser thing
PHP код:
INI_String("IP",PlayerInfo[playerid][pIP],16); 
Heres the code in registering
PHP код:
new IP[16];
GetPlayerIp(playerid,IP,sizeof(IP));
INI_WriteString(File,"IP",IP); 
OnPlayerDisconnect ->

PHP код:
INI_WriteInt(File,"IP",PlayerInfo[playerid][pIP]); 
INI file
PHP код:
IP 52 
Idk whats wrong S:
Reply
#2

Change this code:
Код:
INI_WriteInt(File,"IP",PlayerInfo[playerid][pIP]);
into this
Код:
INI_WriteString(File,"IP",PlayerInfo[playerid][pIP]);
You save the player IP as an integer.
Reply
#3

Oh Thanks men
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)