Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. forward JoinsLog(string[]);
  2.  
  3. public JoinsLog(string[])
  4. {
  5. new entry[128];
  6. format(entry, sizeof(entry), "%s\n",string);
  7. new File:hFile;
  8. hFile = fopen("/logs/joins.log", io_append);
  9. fwrite(hFile, entry);
  10. fclose(hFile);
  11. }
  12.  
  13. //
  14.  
  15. OnPlayerConnect:
  16.  
  17. new IP[16];
  18. GetPlayerName(playerid,name,sizeof name);
  19. GetPlayerIp(playerid, IP, 16);
  20. format(msg,sizeof(msg),"%s has joined - IP: %s", playerid,name,IP);
  21. IRC_GroupSay(gGroupID, IRC_LOGIN_CHANNEL, msg);
  22. JoinsLog(msg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement