CallBack::SetPlayerAka(playerid)
{
if(strlen(dini_Get(DIR_AKA_IP, GetPlayerIpEx(playerid))) == 0) dini_Set(DIR_AKA_IP, GetPlayerIpEx(playerid), GetPlayerNameEx(playerid));
else
{
if(strfind(dini_Get(DIR_AKA_IP, GetPlayerIpEx(playerid)), GetPlayerNameEx(playerid), true) == -1)
{
format(_string,sizeof(_string),"%s,%s", dini_Get(DIR_AKA_IP,GetPlayerIpEx(playerid)), GetPlayerNameEx(playerid));
dini_Set(DIR_AKA_IP, GetPlayerIpEx(playerid), _string);
}
}
return true;
}
new Variavel[50];
CallBack::SetPlayerAka(playerid)
{
INI_ParseFile(DIR_AKA_IP, "CarregarVariavel", false, true, playerid);
new INI:Arquivo = INI_Open(DIR_AKA_IP);
if(strlen(Variavel) == 0)
{
INI_WriteString(Arquivo, GetPlayerIpEx(playerid), GetPlayerNameEx(playerid));
}
else
{
if(strfind(Variavel, GetPlayerNameEx(playerid), true) == -1)
{
format(_string,sizeof(_string),"%s,%s", Variavel, GetPlayerNameEx(playerid));
INI_WriteString(Arquivo, GetPlayerIpEx(playerid), _string);
}
}
INI_Close(Arquivo);
return true;
}
forward CarregarVariavel(playerid, name[], value[]);
public CarregarVariavel(playerid, name[], value[])
{
INI_String(GetPlayerIpEx(playerid), Variavel, 50);
return true;
}
Converti o seu cуdigo :
pawn Код:
Espero ter ajudado . |