Advertisement
Alexander_Batrakov

Untitled

Feb 12th, 2020
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. public Action:OnPlayerRunCmd(client, &buttons, &impuls, Float:vel[3], Float:angles[3], &weapon)
  2. {
  3.     if(!MeEnable[client])return Plugin_Continue;
  4.     if(ControlMode[client]==1)
  5.     {
  6.         new lastButton=LastButton[client];
  7.         LastButton[client]=buttons;
  8.         new Float:time=GetEngineTime();
  9.         if((buttons & IN_ATTACK2) && !(lastButton & IN_ATTACK2)){
  10.             Process(client, time, buttons, false);
  11.         }else{
  12.         if(weapon>0 ){
  13.         if(time-LastSwitchTime[client]<0.3){
  14.             Process(client, time, buttons, true, weapon);
  15.            
  16.         }else{
  17.             Process(client, time, buttons, false); }
  18.         LastSwitchTime[client]=time; }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement