Advertisement
BaSs_HaXoR

MW3 OnplayerSpawn() C++

Sep 23rd, 2014
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. //Source: http://www.nextgenupdate.com/forums/modern-warfare-3-mods-patches-tutorials/763141-c-1-24-onplayerspawned.html
  2.  
  3. void onPlayerSpawned()
  4. {
  5.     for(;;)
  6.     {
  7.         for(int i = 0; i < 18; i++)
  8.         {
  9.             if(*(int*)(G_Client(i) + 0x3980) == 0x00)
  10.             {
  11.                 if(!WelcomeDisplayed[i])
  12.                 {
  13.                     sleep(250);
  14.                     /*
  15.                     Things you want on spawn here
  16.                     */
  17.                     WelcomeDisplayed[i] = true;
  18.                 }
  19.             }
  20.             else
  21.                 WelcomeDisplayed[i] = false;
  22.         }
  23.     }
  24. }
  25.  
  26.  
  27. int G_Client(int client)
  28. {
  29.     return (0x0110A280 + (0x3980* client));
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement