new pIP[50]; GetPlayerIp(playerid,pIP,50);
new string2[256];
if(strlen(dini_Get("ZeroAdmin/aka.txt", pIP)) == 0)
dini_Set("ZeroAdmin/aka.txt", pIP, PlayerName);
else
{
if( strfind( dini_Get("ZeroAdmin/aka.txt", pIP), PlayerName, true) == -1 )
{
format(string2,sizeof(string2),"%s,%s", dini_Get("ZeroAdmin/aka.txt",pIP), PlayerName);
dini_Set("ZeroAdmin/aka.txt", pIP, string2);
}
}
If you want to put this into y_ini, convert it to y_ini first...
|
new pIP[50]; GetPlayerIp(playerid,pIP,50);
new string2[256];
if(strlen(INI_String("ZeroAdmin/aka.txt", pIP)) == 0)
INI_WriteString("ZeroAdmin/aka.txt", pIP, PlayerName);
else
{
if( strfind(INI_String("ZeroAdmin/aka.txt", pIP), PlayerName, true) == -1 )
{
format(string2,sizeof(string2),"%s,%s", INI_String("ZeroAdmin/aka.txt",pIP), PlayerName);
INI_WriteString("ZeroAdmin/aka.txt", pIP, string2);
}
}
dini to y_ini: dini_Get -> INI_String dini_Int -> INI_Int dini_IntSet -> INI_WriteInt dini_Set -> INI_WriteString
C:\Users\Mivco\Desktop\GameMode.pwn(206) : error 017: undefined symbol "INI_String"
C:\Users\Mivco\Desktop\GameMode.pwn(207) : error 035: argument type mismatch (argument 1)
C:\Users\Mivco\Desktop\GameMode.pwn(210) : error 029: invalid expression, assumed zero
C:\Users\Mivco\Desktop\GameMode.pwn(210) : error 017: undefined symbol "name"
C:\Users\Mivco\Desktop\GameMode.pwn(210) : error 001: expected token: ";", but found "return"
C:\Users\Mivco\Desktop\GameMode.pwn(210) : fatal error 107: too many error messages on one line
INI_String("Example",example,24);