need help
#6

Well i coded it again and now it works.
pawn Код:
#define UserPath "VIP"
pawn Код:
public OnPlayerConnect(playerid)
{
  new FilePath[32];
  new Ip[16];
  GetPlayerIp(playerid,Ip,sizeof(Ip));

  format(FilePath, sizeof(FilePath), "%s/%s.ini", UserPath, PlayerName(playerid));
  if(!dini_Exists(FilePath)) {
    dini_Create(FilePath);
    dini_Set(FilePath, "Name", PlayerName(playerid));
    dini_Set(FilePath, "Ip", Ip);
    dini_IntSet(FilePath, "VIP", 0);
  }
  return 1;
}
You will also need this stock for that.
Using stock when you need to get players name is much easier than using GetPlayerName.
pawn Код:
stock PlayerName(playerid) {
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}
Reply


Messages In This Thread
need help - by aircombat - 12.03.2010, 11:37
Re: need help - by lameguy - 12.03.2010, 11:40
Re: need help - by aircombat - 12.03.2010, 11:44
Re: need help - by lameguy - 12.03.2010, 11:50
Re: need help - by aircombat - 12.03.2010, 13:43
Re: need help - by lameguy - 12.03.2010, 14:15
Re: need help - by aircombat - 12.03.2010, 15:45
Re: need help - by lameguy - 12.03.2010, 19:38
Re: need help - by aircombat - 12.03.2010, 20:49
Re: need help - by SlashPT - 12.03.2010, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)