Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 2618iksqzf dodana przez Gość, 19.06.2015 21:21
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95.
#include <sdktools> #include <sdkhooks> #include <sourcemod> #include <cmod> new const String:nazwaKlasy[] = "ProCień [Premium]"; new const String:opisKlasy[] = "1/4 z Auto Shotgun'a, na kosie jest niewidzialny."; new const intKlasy = 0; new const conKlasy = 45; new const strKlasy = 45; new const dexKlasy = 45; new Handle:bronieKlasy; new bool:active[MAXPLAYERS+1]; public Plugin:myinfo = { name = "CmodClass: ProCień [Premium]", author = "Lucifer", description = "1/4 z Auto Shotgun'a, na kosie jest niewidzialny.", version = "1.0", url = "http://steamcommunity.com/profiles/76561197960680254" } public OnPluginStart(){ bronieKlasy = CreateArray(32); PushArrayString(bronieKlasy, "weapon_xm1014"); PushArrayString(bronieKlasy, "weapon_glock"); Cmod_RegisterClass(nazwaKlasy, opisKlasy, intKlasy, conKlasy, strKlasy, dexKlasy, bronieKlasy); } public OnClientPutInServer(client){ SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); } public Cmod_OnClassEnabled(client){ if(!GetAdminFlag(GetUserAdmin(client), Admin_Custom1)){ PrintToChat(client, "x01x0Bx01 x07%s x06Klasa dostępna tylko dla posiadaczy premium!", MOD_TAG); return CMOD_DISABLE; } active[client] = true; return CMOD_CONTINUE; } public Cmod_OnClassDisabled(client){ active[client] = false; } public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) { if(!IsValidClient(attacker)) return Plugin_Continue; if(GetClientTeam(attacker) == GetClientTeam(victim)) return Plugin_Continue; if(active[attacker]){ decl String:sWeapon[32]; GetClientWeapon(attacker, sWeapon, sizeof(sWeapon)); if(StrEqual(sWeapon, "weapon_xm1014")){ if(!GetRandomInt(0,3)){ damage = 99999999.0; return Plugin_Changed; } } } return Plugin_Continue; } public OnGameFrame(){ for(new client = 1; client <= MaxClients; client++){ if(IsClientConnected(client) && IsClientInGame(client)){ if(active[client]){ decl String:sWeapon[32]; GetClientWeapon(client, sWeapon, sizeof(sWeapon)); if(StrEqual(sWeapon, "weapon_knife")){ SetEntityRenderMode(client , RENDER_NONE); }else{ SetEntityRenderMode(client, RENDER_NORMAL); } } } } } bool:IsValidClient( client ) { if ( !( 1 <= client <= MaxClients ) || !IsClientInGame(client) ) return false; return true; }
Dodanych wklejek: 11179
Powered By (Pav32) Pastebin © 2011