Advertisement
togie6

Project Vantage 2.0 Sourcecode Decompiled with Lysis

Jun 17th, 2012
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.52 KB | None | 0 0
  1. new PlVers:__version = 5;
  2. new Float:NULL_VECTOR[3];
  3. new String:NULL_STRING[1];
  4. new Extension:__ext_core = 64;
  5. new MaxClients;
  6. new Extension:__ext_sdktools = 328;
  7. new Extension:__ext_sdkhooks = 372;
  8. new Float:PreviousPunchAngle[65][3];
  9. new BurstShotsFired[65];
  10. new ModeStateArray[65][2];
  11. new ProcessArray[65][4];
  12. new bool:IsAdmin[65];
  13. new g_iBunnyhop[65];
  14. new g_iNoFlash[65];
  15. new g_iFlashAlpha = -1;
  16. new Float:TakeDmg[65];
  17. new Float:TakeDmg[65];
  18. new Float:ChanceToTakeDmg[65];
  19. new Triggerbot[65];
  20. new Aimbot[65];
  21. new AimbotMulti[65];
  22. new OnAttack[65];
  23. new NoFallDmg[65];
  24. new Float:aFov[65];
  25. new Float:Speedhack[65];
  26. new Float:Smooth[65];
  27. new Float:AimChance[65];
  28. new Handle:WeaponTypeTrie;
  29. new Handle:WeaponZoomSpeedTrie;
  30. new AimPos[65];
  31. new AimT[65];
  32. new All[65][14];
  33. new Float:HeadChance[65];
  34. new HeadChanceF[65];
  35. new Float:view_angles[65][3];
  36. new aimbot_event;
  37. public Plugin:myinfo =
  38. {
  39. name = "Basic Chat",
  40. description = "",
  41. author = "AlliedModders LLC",
  42. version = "1.3.6",
  43. url = ""
  44. };
  45. public __ext_core_SetNTVOptional()
  46. {
  47. MarkNativeAsOptional("GetFeatureStatus");
  48. MarkNativeAsOptional("RequireFeature");
  49. MarkNativeAsOptional("AddCommandListener");
  50. MarkNativeAsOptional("RemoveCommandListener");
  51. VerifyCoreVersion();
  52. return 0;
  53. }
  54.  
  55. Float:operator-(Float:)(Float:oper)
  56. {
  57. return oper ^ 0;
  58. }
  59.  
  60. Float:operator*(Float:,_:)(Float:oper1, oper2)
  61. {
  62. return FloatMul(oper1, float(oper2));
  63. }
  64.  
  65. Float:operator/(Float:,_:)(Float:oper1, oper2)
  66. {
  67. return FloatDiv(oper1, float(oper2));
  68. }
  69.  
  70. bool:operator==(Float:,Float:)(Float:oper1, Float:oper2)
  71. {
  72. return FloatCompare(oper1, oper2) == 0;
  73. }
  74.  
  75. bool:operator!=(Float:,Float:)(Float:oper1, Float:oper2)
  76. {
  77. return FloatCompare(oper1, oper2) != 0;
  78. }
  79.  
  80. bool:operator!=(Float:,_:)(Float:oper1, oper2)
  81. {
  82. return FloatCompare(oper1, float(oper2)) != 0;
  83. }
  84.  
  85. bool:operator>(Float:,Float:)(Float:oper1, Float:oper2)
  86. {
  87. return FloatCompare(oper1, oper2) > 0;
  88. }
  89.  
  90. bool:operator>=(Float:,Float:)(Float:oper1, Float:oper2)
  91. {
  92. return FloatCompare(oper1, oper2) >= 0;
  93. }
  94.  
  95. bool:operator>=(Float:,_:)(Float:oper1, oper2)
  96. {
  97. return FloatCompare(oper1, float(oper2)) >= 0;
  98. }
  99.  
  100. bool:operator<(Float:,Float:)(Float:oper1, Float:oper2)
  101. {
  102. return FloatCompare(oper1, oper2) < 0;
  103. }
  104.  
  105. bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
  106. {
  107. return strcmp(str1, str2, caseSensitive) == 0;
  108. }
  109.  
  110. StrCat(String:buffer[], maxlength, String:source[])
  111. {
  112. new len = strlen(buffer);
  113. if (len >= maxlength) {
  114. return 0;
  115. }
  116. return Format(buffer[len], maxlength - len, "%s", source);
  117. }
  118.  
  119. GetEntDataArray(entity, offset, array[], arraySize, dataSize)
  120. {
  121. new i = 0;
  122. while (i < arraySize) {
  123. array[i] = GetEntData(entity, dataSize * i + offset, dataSize);
  124. i++;
  125. }
  126. return 0;
  127. }
  128.  
  129. SetEntDataArray(entity, offset, array[], arraySize, dataSize, bool:changeState)
  130. {
  131. new i = 0;
  132. while (i < arraySize) {
  133. SetEntData(entity, dataSize * i + offset, array[i], dataSize, changeState);
  134. i++;
  135. }
  136. return 0;
  137. }
  138.  
  139. GetEntityFlags(entity)
  140. {
  141. static bool:gotconfig;
  142. static String:datamap[8];
  143. if (!gotconfig) {
  144. new Handle:gc = LoadGameConfigFile("core.games");
  145. new bool:exists = GameConfGetKeyValue(gc, "m_fFlags", "", 32);
  146. CloseHandle(gc);
  147. if (!exists) {
  148. strcopy("", 32, "m_fFlags");
  149. }
  150. __unk = 1;
  151. }
  152. return GetEntProp(entity, PropType:1, "", 4);
  153. }
  154.  
  155. GetClientButtons(client)
  156. {
  157. static bool:gotconfig;
  158. static String:datamap[8];
  159. if (!gotconfig) {
  160. new Handle:gc = LoadGameConfigFile("core.games");
  161. new bool:exists = GameConfGetKeyValue(gc, "m_nButtons", "", 32);
  162. CloseHandle(gc);
  163. if (!exists) {
  164. strcopy("", 32, "m_nButtons");
  165. }
  166. __unk = 1;
  167. }
  168. return GetEntProp(client, PropType:1, "", 4);
  169. }
  170.  
  171.  
  172. /* ERROR! Unrecognized opcode: genarray_z */
  173. function "EmitSoundToAll" (number 17)
  174. public OnPluginStart()
  175. {
  176. WeaponTypeTrie = CreateTrie();
  177. WeaponZoomSpeedTrie = CreateTrie();
  178. CreateConVar("ssh_version", "2.0", "Current Version", 0, false, 0, false, 0);
  179. g_iFlashAlpha = FindSendPropOffs("CCSPlayer", "m_flFlashMaxAlpha");
  180. HookEvent("player_blind", EventHook:5, EventHookMode:1);
  181. HookEvent("player_spawn", EventHook:9, EventHookMode:1);
  182. HookEventEx("player_death", EventHook:7, EventHookMode:0);
  183. HookEvent("weapon_fire", EventHook:11, EventHookMode:1);
  184. RegConsoleCmd("ssh_weapon", ModAttribute, "", 0);
  185. RegConsoleCmd("ssh_bunnyhop", ModBunnyhop, "", 0);
  186. RegConsoleCmd("ssh_noflash", ModNoFlash, "", 0);
  187. RegConsoleCmd("ssh_takendmg", ModLag, "", 0);
  188. RegConsoleCmd("ssh_lag", ModChance, "", 0);
  189. RegConsoleCmd("ssh_triggerbot", ModTrigger, "", 0);
  190. RegConsoleCmd("ssh_speedhack", ModSpeed, "", 0);
  191. RegConsoleCmd("ssh_aimbot", ModAim, "", 0);
  192. RegConsoleCmd("ssh_nofalldmg", ModFallDmg, "", 0);
  193. RegConsoleCmd("ssh_info", ModInfo, "", 0);
  194. RegConsoleCmd("say", Command_Say, "", 0);
  195. RegConsoleCmd("say_team", Command_Say, "", 0);
  196. new cnt = 0;
  197. while (cnt <= 64) {
  198. Aimbot[cnt] = 0;
  199. AimbotMulti[cnt] = 1;
  200. HeadChance[cnt] = 1065353216;
  201. AimPos[cnt] = 0;
  202. OnAttack[cnt] = 0;
  203. Smooth[cnt] = 1065353216;
  204. Speedhack[cnt] = 1065353216;
  205. Triggerbot[cnt] = 0;
  206. TakeDmg[cnt] = 1065353216;
  207. ChanceToTakeDmg[cnt] = 1065353216;
  208. AimT[cnt] = 0;
  209. All[cnt][0][0][0] = 1065353216;
  210. All[cnt][0][0][4] = -1082130432;
  211. All[cnt][0][0][8] = 1065353216;
  212. All[cnt][0][0][12] = -1;
  213. All[cnt][0][0][16] = 1065353216;
  214. All[cnt][0][0][20] = 1065353216;
  215. All[cnt][0][0][24] = 1065353216;
  216. All[cnt][0][0][28] = 1065353216;
  217. All[cnt][0][0][32] = 1065353216;
  218. All[cnt][0][0][36] = 1065353216;
  219. All[cnt][0][0][40] = 1065353216;
  220. All[cnt][0][0][44] = -1;
  221. All[cnt][0][0][48] = 0;
  222. All[cnt][0][0][52] = 0;
  223. AimChance[cnt] = 1065353216;
  224. SetTrieArray(WeaponTypeTrie, "all", All[cnt][0][0], 14, true);
  225. cnt++;
  226. }
  227. SetTrieValue(WeaponZoomSpeedTrie, "scout", any:1066878417, true);
  228. SetTrieValue(WeaponZoomSpeedTrie, "sg552", any:1066821222, true);
  229. SetTrieValue(WeaponZoomSpeedTrie, "awp", any:1068708659, true);
  230. SetTrieValue(WeaponZoomSpeedTrie, "sg550", any:1068708659, true);
  231. new client = 1;
  232. while (client <= MaxClients) {
  233. new AdminId:aid = GetUserAdmin(client);
  234. if (aid != AdminId:-1) {
  235. if (GetAdminFlag(aid, AdminFlag:15, AdmAccessMode:1)) {
  236. IsAdmin[client] = 1;
  237. }
  238. }
  239. if (IsClientInGame(client)) {
  240. SDKHook(client, SDKHookType:5, SDKHookCB:53);
  241. SDKHook(client, SDKHookType:20, SDKHookCB:55);
  242. SDKHook(client, SDKHookType:11, SDKHookCB:61);
  243. SDKHook(client, SDKHookType:16, SDKHookCB:63);
  244. SDKHook(client, SDKHookType:2, SDKHookCB:59);
  245. SDKHook(client, SDKHookType:17, SDKHookCB:65);
  246. SDKHook(client, SDKHookType:1, SDKHookCB:45);
  247. client++;
  248. }
  249. client++;
  250. }
  251. return 0;
  252. }
  253.  
  254. public OnClientPutInServer(client)
  255. {
  256. SDKHook(client, SDKHookType:5, SDKHookCB:53);
  257. SDKHook(client, SDKHookType:20, SDKHookCB:55);
  258. SDKHook(client, SDKHookType:11, SDKHookCB:61);
  259. SDKHook(client, SDKHookType:16, SDKHookCB:63);
  260. SDKHook(client, SDKHookType:2, SDKHookCB:59);
  261. SDKHook(client, SDKHookType:17, SDKHookCB:65);
  262. SDKHook(client, SDKHookType:1, SDKHookCB:45);
  263. Smooth[client] = 1065353216;
  264. return 0;
  265. }
  266.  
  267. public OnClientDisconnect(client)
  268. {
  269. if (IsClientInGame(client)) {
  270. Aimbot[client] = 0;
  271. AimbotMulti[client] = 1;
  272. HeadChance[client] = 1065353216;
  273. IsAdmin[client] = 0;
  274. AimPos[client] = 0;
  275. Smooth[client] = 1065353216;
  276. OnAttack[client] = 0;
  277. Speedhack[client] = 1065353216;
  278. Triggerbot[client] = 0;
  279. g_iBunnyhop[client] = 0;
  280. g_iNoFlash[client] = 0;
  281. TakeDmg[client] = 1065353216;
  282. ChanceToTakeDmg[client] = 1065353216;
  283. All[client][0][0][0] = 1065353216;
  284. All[client][0][0][4] = -1082130432;
  285. All[client][0][0][8] = 1065353216;
  286. All[client][0][0][12] = -1;
  287. All[client][0][0][16] = 1065353216;
  288. All[client][0][0][20] = 1065353216;
  289. All[client][0][0][24] = 1065353216;
  290. All[client][0][0][28] = 1065353216;
  291. All[client][0][0][32] = 1065353216;
  292. All[client][0][0][36] = 1065353216;
  293. All[client][0][0][40] = 1065353216;
  294. All[client][0][0][44] = -1;
  295. All[client][0][0][48] = 0;
  296. All[client][0][0][52] = 0;
  297. AimT[client] = 0;
  298. AimChance[client] = 1065353216;
  299. }
  300. return 0;
  301. }
  302.  
  303. public Action:EventPlayerBlind(Handle:event, String:name[], bool:dontBroadcast)
  304. {
  305. new client = GetClientOfUserId(GetEventInt(event, "userid"));
  306. if (!IsAdmin[client][0][0]) {
  307. return Action:0;
  308. }
  309. return Action:0;
  310. }
  311.  
  312. public Action:EventPlayerDeath(Handle:event, String:name[], bool:dontBroadcast)
  313. {
  314. new client = GetClientOfUserId(GetEventInt(event, "userid"));
  315. new client2 = GetClientOfUserId(GetEventInt(event, "attacker"));
  316. new var1;
  317. if (aimbot_event == client) {
  318. EmitSoundToAll("player/headshot1.wav", client, 2, 326, 0, 1, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0);
  319. SetEventBool(event, "headshot", true);
  320. aimbot_event = -1;
  321. HeadChanceF[client2] = 0;
  322. }
  323. return Action:0;
  324. }
  325.  
  326. public OnClientPostAdminCheck(client)
  327. {
  328. new var1;
  329. if (IsFakeClient(client)) {
  330. return 0;
  331. }
  332. new AdminId:aid = GetUserAdmin(client);
  333. if (aid != AdminId:-1) {
  334. if (GetAdminFlag(aid, AdminFlag:15, AdmAccessMode:1)) {
  335. IsAdmin[client] = 1;
  336. }
  337. }
  338. return 0;
  339. }
  340.  
  341. public OnPluginEnd()
  342. {
  343. CloseHandle(WeaponTypeTrie);
  344. CloseHandle(WeaponZoomSpeedTrie);
  345. return 0;
  346. }
  347.  
  348. public Action:ModBunnyhop(client, args)
  349. {
  350. if (!IsAdmin[client][0][0]) {
  351. return Action:0;
  352. }
  353. decl String:AttributeValue[20];
  354. GetCmdArg(1, AttributeValue, 20);
  355. g_iBunnyhop[client] = StringToInt(AttributeValue, 10);
  356. return Action:3;
  357. }
  358.  
  359. public Action:Command_Say(client, args)
  360. {
  361. if (!IsAdmin[client][0][0]) {
  362. return Action:0;
  363. }
  364. decl String:AttributeValue[128];
  365. decl String:final[256];
  366. BuildPath(PathType:0, final, 256, "ssh/");
  367. GetCmdArg(1, AttributeValue, 128);
  368. StrCat(final, 256, AttributeValue);
  369. StrCat(final, 256, ".cfg");
  370. new Handle:userfile = OpenFile(final, "r+");
  371. if (FileExists(final, false)) {
  372. while (!IsEndOfFile(userfile)) {
  373. decl String:line[256];
  374. ReadFileLine(userfile, line, 256);
  375. FakeClientCommand(client, line);
  376. }
  377. }
  378. return Action:0;
  379. }
  380.  
  381. public Action:ModFallDmg(client, args)
  382. {
  383. if (!IsAdmin[client][0][0]) {
  384. return Action:3;
  385. }
  386. decl String:AttributeValue[20];
  387. GetCmdArg(1, AttributeValue, 20);
  388. NoFallDmg[client] = StringToInt(AttributeValue, 10);
  389. return Action:3;
  390. }
  391.  
  392. public Action:ModSpoof(client, args)
  393. {
  394. PrintToConsole(client, "Unknown Command");
  395. return Action:3;
  396. }
  397.  
  398. public Action:ModAim(client, args)
  399. {
  400. if (!IsAdmin[client][0][0]) {
  401. return Action:3;
  402. }
  403. decl String:AttributeValue1[20];
  404. decl String:AttributeValue2[20];
  405. GetCmdArg(1, AttributeValue1, 20);
  406. if (GetCmdArgs() != 2) {
  407. Aimbot[client] = StringToInt(AttributeValue1, 10);
  408. } else {
  409. GetCmdArg(2, AttributeValue2, 20);
  410. if (StrEqual("fov", AttributeValue1, false)) {
  411. aFov[client] = StringToFloat(AttributeValue2);
  412. }
  413. if (StrEqual("smooth", AttributeValue1, false)) {
  414. if (StringToFloat(AttributeValue2) >= 1) {
  415. Smooth[client] = StringToFloat(AttributeValue2);
  416. }
  417. }
  418. if (StrEqual("onattack", AttributeValue1, false)) {
  419. OnAttack[client] = StringToInt(AttributeValue2, 10);
  420. }
  421. if (StrEqual("through", AttributeValue1, false)) {
  422. AimT[client] = StringToInt(AttributeValue2, 10);
  423. }
  424. if (StrEqual("chance", AttributeValue1, false)) {
  425. AimChance[client] = StringToFloat(AttributeValue2);
  426. }
  427. if (StrEqual("hs_chance", AttributeValue1, false)) {
  428. HeadChance[client] = StringToFloat(AttributeValue2);
  429. }
  430. if (StrEqual("multi", AttributeValue1, false)) {
  431. AimbotMulti[client] = StringToInt(AttributeValue2, 10);
  432. }
  433. if (StrEqual("pos", AttributeValue1, false)) {
  434. if (StrEqual("head", AttributeValue2, false)) {
  435. AimPos[client] = 0;
  436. }
  437. if (StrEqual("normal", AttributeValue2, false)) {
  438. AimPos[client] = 1;
  439. }
  440. }
  441. }
  442. return Action:3;
  443. }
  444.  
  445. public Action:ModInfo(client, args)
  446. {
  447. if (!IsAdmin[client][0][0]) {
  448. return Action:3;
  449. }
  450. PrintToConsole(client, "\n");
  451. PrintToConsole(client, "ssh_aimbot 1");
  452. PrintToConsole(client, "ssh_bunnyhop 0-1");
  453. PrintToConsole(client, "ssh_noflash 0-1");
  454. PrintToConsole(client, "ssh_lag 0.0-1.0");
  455. PrintToConsole(client, "ssh_takendmg 0.0-1.0");
  456. PrintToConsole(client, "ssh_weapon <sub> <value>");
  457. PrintToConsole(client, "ssh_triggerbot 0-1");
  458. PrintToConsole(client, "ssh_speedhack 0.0-50.0");
  459. PrintToConsole(client, "ssh_nofalldmg 0-1");
  460. PrintToConsole(client, "\n");
  461. PrintToConsole(client, "Aimbot Subkeys:");
  462. PrintToConsole(client, "fov 0.0-360.0");
  463. PrintToConsole(client, "onattack 0-1");
  464. PrintToConsole(client, "\n");
  465. PrintToConsole(client, "Weapon Subkeys:");
  466. PrintToConsole(client, "\n");
  467. PrintToConsole(client, "recoil 0.0-1.0");
  468. PrintToConsole(client, "firerate 0-25");
  469. PrintToConsole(client, "dmg 0-30");
  470. PrintToConsole(client, "dmg_head 0-30");
  471. PrintToConsole(client, "dmg_leg 0-30");
  472. PrintToConsole(client, "dmg_arm 0-30");
  473. PrintToConsole(client, "dmg_chest 0-30");
  474. PrintToConsole(client, "ammo 0-1");
  475. PrintToConsole(client, "fastswitch");
  476. return Action:3;
  477. }
  478.  
  479. public Action:ModSpeed(client, args)
  480. {
  481. if (!IsAdmin[client][0][0]) {
  482. return Action:3;
  483. }
  484. decl String:AttributeValue[20];
  485. GetCmdArg(1, AttributeValue, 20);
  486. Speedhack[client] = StringToFloat(AttributeValue);
  487. SetEntPropFloat(client, PropType:1, "m_flLaggedMovementValue", Speedhack[client][0][0]);
  488. return Action:3;
  489. }
  490.  
  491. public Action:ModTrigger(client, args)
  492. {
  493. if (!IsAdmin[client][0][0]) {
  494. return Action:3;
  495. }
  496. decl String:AttributeValue[20];
  497. GetCmdArg(1, AttributeValue, 20);
  498. Triggerbot[client] = StringToInt(AttributeValue, 10);
  499. return Action:3;
  500. }
  501.  
  502. public Action:ModNoFlash(client, args)
  503. {
  504. if (!IsAdmin[client][0][0]) {
  505. return Action:3;
  506. }
  507. decl String:AttributeValue[20];
  508. GetCmdArg(1, AttributeValue, 20);
  509. g_iNoFlash[client] = StringToInt(AttributeValue, 10);
  510. return Action:3;
  511. }
  512.  
  513. public Action:ModLag(client, args)
  514. {
  515. if (!IsAdmin[client][0][0]) {
  516. return Action:3;
  517. }
  518. decl String:AttributeValue[20];
  519. GetCmdArg(1, AttributeValue, 20);
  520. TakeDmg[client] = StringToFloat(AttributeValue);
  521. return Action:3;
  522. }
  523.  
  524. public Action:ModChance(client, args)
  525. {
  526. if (!IsAdmin[client][0][0]) {
  527. return Action:3;
  528. }
  529. decl String:AttributeValue[20];
  530. GetCmdArg(1, AttributeValue, 20);
  531. ChanceToTakeDmg[client] = StringToFloat(AttributeValue);
  532. return Action:3;
  533. }
  534.  
  535.  
  536. /* ERROR! unknown operator */
  537. function "ModAttribute" (number 36)
  538. public bool:TraceRayDontHitSelf(entity, mask, data)
  539. {
  540. if (data == entity) {
  541. return false;
  542. }
  543. return true;
  544. }
  545.  
  546. public Action:EventPlayerSpawn(Handle:event, String:name[], bool:dontBroadcast)
  547. {
  548. new client = GetClientOfUserId(GetEventInt(event, "userid"));
  549. SetEntPropFloat(client, PropType:1, "m_flLaggedMovementValue", Speedhack[client][0][0]);
  550. return Action:0;
  551. }
  552.  
  553.  
  554. /* ERROR! unknown operator */
  555. function "MakeVector" (number 39)
  556. public CalcAngle(Float:src[3], Float:dst[3], Float:angles[3])
  557. {
  558. decl Float:delta[3];
  559. delta[0] = FloatSub(src[0], dst[0]);
  560. delta[4] = FloatSub(src[4], dst[4]);
  561. delta[8] = FloatSub(src[8], dst[8]);
  562. new Float:hyp = SquareRoot(FloatAdd(FloatMul(delta[0], delta[0]), FloatMul(delta[4], delta[4])));
  563. angles[0] = FloatMul(3.14159, ArcTangent(FloatDiv(delta[8], hyp)));
  564. angles[4] = FloatMul(3.14159, ArcTangent(FloatDiv(delta[4], delta[0])));
  565. angles[8] = 0;
  566. if (delta[0] >= 0) {
  567. new var1 = angles[4];
  568. var1 = FloatAdd(180, var1);
  569. }
  570. return 0;
  571. }
  572.  
  573. public Float:GetDmg(client, cnt)
  574. {
  575. decl String:buf[256];
  576. GetClientWeapon(client, buf, 256);
  577. new Float:ret = 0;
  578. if (strcmp(buf, "weapon_glock", true)) {
  579. if (strcmp(buf, "weapon_usp", true)) {
  580. if (strcmp(buf, "weapon_p228", true)) {
  581. if (strcmp(buf, "weapon_deagle", true)) {
  582. if (strcmp(buf, "weapon_elite", true)) {
  583. if (strcmp(buf, "weapon_fiveseven", true)) {
  584. if (strcmp(buf, "weapon_m3", true)) {
  585. if (strcmp(buf, "weapon_xm1014", true)) {
  586. if (strcmp(buf, "weapon_galil", true)) {
  587. if (strcmp(buf, "weapon_ak47", true)) {
  588. if (strcmp(buf, "weapon_scout", true)) {
  589. if (strcmp(buf, "weapon_sg552", true)) {
  590. if (strcmp(buf, "weapon_awp", true)) {
  591. if (strcmp(buf, "weapon_g3sg1", true)) {
  592. if (strcmp(buf, "weapon_famas", true)) {
  593. if (strcmp(buf, "weapon_m4a1", true)) {
  594. if (strcmp(buf, "weapon_aug", true)) {
  595. if (strcmp(buf, "weapon_sg550", true)) {
  596. if (strcmp(buf, "weapon_mac10", true)) {
  597. if (strcmp(buf, "weapon_tmp", true)) {
  598. if (strcmp(buf, "weapon_mp5navy", true)) {
  599. if (strcmp(buf, "weapon_ump45", true)) {
  600. if (strcmp(buf, "weapon_p90", true)) {
  601. if (strcmp(buf, "weapon_m249", true)) {
  602. } else {
  603. ret = FloatAdd(100, GetRandomFloat(1, 25));
  604. }
  605. }
  606. ret = FloatAdd(65, GetRandomFloat(1, 30));
  607. }
  608. ret = FloatAdd(60, GetRandomFloat(1, 20));
  609. }
  610. ret = FloatAdd(70, GetRandomFloat(1, 30));
  611. }
  612. ret = FloatAdd(70, GetRandomFloat(1, 25));
  613. }
  614. ret = FloatAdd(70, GetRandomFloat(1, 30));
  615. }
  616. ret = FloatAdd(200, GetRandomFloat(1, 100));
  617. }
  618. ret = FloatAdd(110, GetRandomFloat(1, 30));
  619. }
  620. ret = FloatAdd(100, GetRandomFloat(1, 40));
  621. }
  622. ret = FloatAdd(90, GetRandomFloat(1, 25));
  623. }
  624. ret = FloatAdd(200, GetRandomFloat(1, 100));
  625. }
  626. ret = FloatAdd(250, GetRandomFloat(1, 160));
  627. }
  628. ret = FloatAdd(90, GetRandomFloat(1, 30));
  629. }
  630. ret = FloatAdd(150, GetRandomFloat(1, 100));
  631. }
  632. ret = FloatAdd(125, GetRandomFloat(1, 40));
  633. }
  634. ret = FloatAdd(100, GetRandomFloat(1, 40));
  635. }
  636. ret = FloatAdd(65, GetRandomFloat(1, 40));
  637. }
  638. ret = FloatAdd(70, GetRandomFloat(1, 15));
  639. }
  640. ret = FloatAdd(80, GetRandomFloat(1, 15));
  641. }
  642. ret = FloatAdd(70, GetRandomFloat(1, 15));
  643. }
  644. ret = FloatAdd(100, GetRandomFloat(1, 40));
  645. }
  646. ret = FloatAdd(90, GetRandomFloat(1, 15));
  647. }
  648. ret = FloatAdd(85, GetRandomFloat(1, 15));
  649. } else {
  650. ret = FloatAdd(50, GetRandomFloat(0, 15));
  651. }
  652. ret = FloatMul(ret, GetRandomFloat(0.9, 1.1));
  653. new helmet = GetEntProp(cnt, PropType:0, "m_bHasHelmet", 4);
  654. if (helmet) {
  655. ret = FloatMul(0.9, ret);
  656. }
  657. if (!HeadChanceF[client][0][0]) {
  658. ret = FloatMul(ret, GetRandomFloat(0.3, 0.65));
  659. }
  660. return ret;
  661. }
  662.  
  663.  
  664. /* ERROR! unknown operator */
  665. function "EventWeaponFire" (number 42)
  666.  
  667. /* ERROR! unknown operator */
  668. function "OnPlayerRunCmd" (number 43)
  669.  
  670. /* ERROR! unknown operator */
  671. function "OnPreThinkPost" (number 44)
  672.  
  673. /* ERROR! unknown operator */
  674. function "OnPostThink" (number 45)
  675.  
  676. /* ERROR! unknown operator */
  677. function "OnPostThinkPost" (number 46)
  678.  
  679. /* ERROR! unknown operator */
  680. function "OnTraceAttack" (number 47)
  681.  
  682. /* ERROR! unknown operator */
  683. function "OnTakeDamage" (number 48)
  684. public OnFireBullets(client, shots, String:weaponname[])
  685. {
  686. return 0;
  687. }
  688.  
  689. public Action:OnWeaponEquip(client, weapon)
  690. {
  691. decl String:WeaponName[32];
  692. GetEdictClassname(weapon, WeaponName, 30);
  693. ReplaceString(WeaponName, 30, "weapon_", "", false);
  694. decl GetWeaponInfo[14];
  695. GetTrieArray(WeaponTypeTrie, WeaponName, GetWeaponInfo, 14, 0);
  696. if (All[client][0][0][12] != -1) {
  697. ModeStateArray[client][0][0][0] = 0;
  698. }
  699. if (All[client][0][0][44] != -1) {
  700. ModeStateArray[client][0][0][4] = 0;
  701. }
  702. return Action:0;
  703. }
  704.  
  705. public Action:OnWeaponSwitch(client, weapon)
  706. {
  707. BurstShotsFired[client] = 0;
  708. decl String:WeaponName[32];
  709. GetEdictClassname(weapon, WeaponName, 30);
  710. ReplaceString(WeaponName, 30, "weapon_", "", false);
  711. decl GetWeaponInfo[14];
  712. GetTrieArray(WeaponTypeTrie, WeaponName, GetWeaponInfo, 14, 0);
  713. if (All[client][0][0][52] == 1) {
  714. ProcessArray[client][0][0][12] = 1;
  715. }
  716. return Action:0;
  717. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement