12.03.2010, 11:37
i am creating a vip system which all users should save to scriptfiles/vip but the problem is players join and no files get created in the folder , here is the code :
Код:
public OnPlayerConnect(playerid)
{
new file[100];
new Name[MAX_PLAYER_NAME];
new Ip[16];
GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
if(!dini_Exists(file)) {
dini_Create(file);
dini_Set(file,"Name",Name);
dini_Set(file,"Ip",Ip);
dini_IntSet(file,"VIP",0);
}
strcat(PlayerInfo[playerid][PName], dini_Get(file,"Name"));
strcat(PlayerInfo[playerid][Pip], dini_Get(file,"Ip"));
PlayerInfo[playerid][VIP] = dini_Int(file,"VIP");
return 1;
}

