Advertisement
Guest User

Untitled

a guest
May 28th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. public FM_ServerFrame()
  2. {
  3. if(g_bot_enable == 1 && g_bot_id)
  4. {
  5. if(g_bot_frame < ArraySize(g_DemoReplay[g_bot_type]))
  6. {
  7. static id;
  8. id = g_bot_id;
  9. if(!is_user_alive(id))
  10. {
  11. dllfunc(DLLFunc_Spawn, id);
  12. set_pev(id, pev_health, 99999.0);
  13. Start_Bot();
  14. }
  15. else if(get_gametime() >= g_bot_movedelay + ArrayData[flFrameLength])
  16. {
  17. g_bot_movedelay = get_gametime();
  18. g_bot_movedelay = get_gametime();
  19. }
  20. else
  21. {
  22. new ArrayData[DemoData];
  23. new i
  24. for(i = 0; i < g_bot_speed; i++)
  25. {
  26.  
  27. ArrayGetArray(g_DemoReplay[g_bot_type], g_bot_frame, ArrayData);
  28. if(ArrayData[iButton]&IN_ALT1)
  29. ArrayData[iButton]|=IN_JUMP;
  30. if(ArrayData[iButton]&IN_RUN)
  31. ArrayData[iButton]|=IN_DUCK;
  32.  
  33. if(ArrayData[iButton]&IN_RIGHT)
  34. {
  35. engclient_cmd(id, "weapon_usp");
  36. ArrayData[iButton]&=~IN_RIGHT;
  37. }
  38. if(ArrayData[iButton]&IN_LEFT)
  39. {
  40. engclient_cmd(id, "weapon_knife");
  41. ArrayData[iButton]&=~IN_LEFT;
  42. }
  43. g_bot_buttons = ArrayData[iButton];
  44. BotMove(id, g_bot_frame, ArrayData[flFrameLength], ArrayData[flBotAngle], ArrayData[flBotVel], ArrayData[flBotPos], ArrayData[iButton]);
  45. //set_pev(id, pev_button, ArrayData[iButton]);
  46. g_bot_frame++;
  47. }
  48. }
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement