Stefantjuh97

AutoSaveTimer Lewis

Oct 24th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //Place this at the forward things
  2. forward AutoSaveTime();
  3.  
  4. //place this under the "new" things
  5. new stock AutoSaveTimer;
  6.  
  7. //place this under "GameModeInit"
  8. AutoSaveTimer = SetTimer("AutoSaveTime", 300000, true);//Timer that does the AutoSaveTime function each 5 minutes.
  9.  
  10. //place this somewhere in the "public blahblah()" things
  11. public AutoSaveTime()
  12. {
  13. for(new i = 0; i<MAX_PLAYERS; i++)
  14. {
  15. if(gPlayerLogged[i] >= 1)
  16. {
  17. SaveUser(i);
  18. }
  19. }
  20. return 1;
  21. }
  22.  
  23. //Credits: Stefantjuh97
Advertisement
Add Comment
Please, Sign In to add comment