CapsAdmin

Untitled

May 30th, 2011
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.37 KB | None | 0 0
  1. local str = [[function(CanDrop)
  2.     lua->Push(self->CanDrop());
  3.     return 1;
  4. end
  5.  
  6. function(CanSelect)
  7.     lua->Push(self->CanSelect());
  8.     return 1;
  9. end
  10.  
  11. function(CheckAmmoRestrictions)
  12.     lua->Push(self->CheckAmmoRestrictions(lua->GetEntity(2)->GetId()));
  13.     return 1;
  14. end
  15.  
  16. function(Cloak)
  17.     self->Cloak(lua->ToBoolean(2));
  18.     return 0;
  19. end
  20.  
  21. function(Drop)
  22.     self->Drop();
  23.     return 0;
  24. end
  25.  
  26. function(EnableAnimations)
  27.     self->EnableAnimations(lua->ToBoolean(2));
  28.     return 0;
  29. end
  30.  
  31. function(EnableSelect)
  32.     self->EnableSelect(lua->ToBoolean(2));
  33.     return 0;
  34. end
  35.  
  36. function(EnableSound)
  37.     self->EnableSound(lua->ToBoolean(2));
  38.     return 0;
  39. end
  40.  
  41. function(EnterWater)
  42.     self->EnterWater(lua->ToBoolean(2));
  43.     return 0;
  44. end
  45.  
  46. function(GetDualWieldMaster)
  47.     Push(self->GetDualWieldMaster());
  48.     return 1;
  49. end
  50.  
  51. function(GetDualWieldSlave)
  52.     Push(self->GetDualWieldSlave());
  53.     return 1;
  54. end
  55.  
  56. function(GetEntity)
  57.     lua->Push(self->GetEntity());
  58.     return 1;
  59. end
  60.  
  61. function(GetWeapon)
  62.     lua->Push(self->GetIWeapon());
  63.     return 1;
  64. end
  65.  
  66. function(GetMountedAngleLimits)
  67.     lua->Push(self->GetMountedAngleLimits());
  68.     return 1;
  69. end
  70.  
  71. function(GetMountedDir)
  72.     lua->Push(self->GetMountedDir());
  73.     return 1;
  74. end
  75.  
  76. function(GetOwner)
  77.     lua->Push(gEnv->pGame->GetIGameFramework()->GetIActorSystem()->GetActor(self->GetOwnerId()););
  78.     return 1;
  79. end
  80.  
  81. function(Impulse)
  82.     self->Impulse(lua->CheckVec3(2), lua->CheckVec3(2), 1);
  83.     return 0;
  84. end
  85.  
  86. function(IsAmmoPickup)
  87.     lua->Push(self->IsAmmoPickup());
  88.     return 1;
  89. end
  90.  
  91. function(IsBusy)
  92.     lua->Push(self->IsBusy());
  93.     return 1;
  94. end
  95.  
  96. function(IsDualWield)
  97.     lua->Push(self->IsDualWield());
  98.     return 1;
  99. end
  100.  
  101. function(IsDualWieldMaster)
  102.     lua->Push(self->IsDualWieldMaster());
  103.     return 1;
  104. end
  105.  
  106. function(IsDualWieldSlave)
  107.     lua->Push(self->IsDualWieldSlave());
  108.     return 1;
  109. end
  110.  
  111. function(IsMountable)
  112.     lua->Push(self->IsMountable());
  113.     return 1;
  114. end
  115.  
  116. function(IsSoundEnabled)
  117.     lua->Push(self->IsSoundEnabled());
  118.     return 1;
  119. end
  120.  
  121. function(IsTwoHand)
  122.     lua->Push(self->IsTwoHand());
  123.     return 1;
  124. end
  125.  
  126. function(MountAt)
  127.     self->MountAt(lua->CheckVec3(2));
  128.     return 0;
  129. end
  130.  
  131. function(MountAtEntity)
  132.     self->MountAtEntity(lua->GetEntity(2)->GetId(), lua->CheckVec3(3), lua->CheckAng3(4));
  133.     return 0;
  134. end
  135.  
  136. function(SetBusy)
  137.     self->SetBusy(lua->ToBoolean(2));
  138.     return 0;
  139. end
  140.  
  141. function(SetChannelId)
  142.     self->SetChannelId(lua->CheckInteger(2));
  143.     return 0;
  144. end
  145.  
  146. function(SetDualSlaveAccessory)
  147.     self->SetDualSlaveAccessory(lua->ToBoolean(2));
  148.     return 0;
  149. end
  150.  
  151. function(SetDualWieldMaster)
  152.     self->SetDualWieldMaster(lua->GetEntity(2)->GetId());
  153.     return 0;
  154. end
  155.  
  156. function(SetDualWieldSlave)
  157.     self->SetDualWieldSlave(lua->GetEntity(2)->GetId());
  158.     return 0;
  159. end
  160.  
  161. function(SetHand)
  162.     self->SetHand(lua->CheckInteger(2));
  163.     return 0;
  164. end
  165.  
  166. function(SetOwnerId)
  167.     self->SetOwnerId(lua->CheckActor(2)->GetEntityId());
  168.     return 0;
  169. end
  170.  
  171. function(StartUse)
  172.     self->StartUse(lua->CheckActor(2)->GetEntityId());
  173.     return 0;
  174. end
  175.  
  176. function(StopUse)
  177.     self->StopUse(lua->CheckActor(2)->GetEntityId());
  178.     return 0;
  179. end
  180.  
  181. function(SupportsDualWield)
  182.     lua->Push(self->SupportsDualWield(lua->CheckString(2)));
  183.     return 1;
  184. end
  185.  
  186. function(TakeAccessories)
  187.     self->TakeAccessories(lua->GetEntity(2)->GetId());
  188.     return 0;
  189. end]]
  190.  
  191. for _, line in pairs(str:Split"\n") do
  192.     if line:find("function") then
  193.         print(line:gsub("function", "REG") .. ";")
  194.     end
  195. end
Advertisement
Add Comment
Please, Sign In to add comment