Advertisement
Guest User

Untitled

a guest
May 29th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. /* VIP JAILBREAK BY dEAL /*
  2. #include <amxmodx>
  3. #include <colorchat>
  4. #include <cstrike>
  5. #include <fakemeta>
  6. #include <fun>
  7. #include <hamsandwich>
  8.  
  9. #define IsPlayer(%1) (1<=%1<=maxPlayers)
  10.  
  11. forward amxbans_admin_connect(id);
  12.  
  13. new CsArmorType:armortype, bool:g_FreezeTime, bool:g_Vip[33], g_Hudmsg, ioid,
  14. maxPlayers, skoki[33];
  15.  
  16. new const g_Prefix[] = "Vip Chat";
  17.  
  18. public plugin_init(){
  19. register_plugin("VIP Ultimate", "12.3.0.2", "benio101 & speedkill");
  20. RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);
  21. RegisterHam(get_player_resetmaxspeed_func(), "player", "fw_Player_ResetMaxSpeed", 1);
  22. register_logevent("logevent_round_start", 2, "1=Round_Start");
  23. register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
  24. register_forward(FM_CmdStart, "CmdStartPre");
  25. RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);
  26. register_event("DeathMsg", "DeathMsg", "a");
  27. register_message(get_user_msgid("ScoreAttrib"), "VipStatus");
  28. register_clcmd("say_team", "VipChat");
  29. register_message(get_user_msgid("SayText"),"handleSayText");
  30. g_Hudmsg=CreateHudSyncObj();
  31. }
  32. public client_authorized(id){
  33. if(get_user_flags(id) & 262144 == 262144){
  34. client_authorized_vip(id);
  35. }
  36. }
  37. public client_authorized_vip(id){
  38. g_Vip[id]=true;
  39. new g_Name[64];
  40. get_user_name(id,g_Name,charsmax(g_Name));
  41. set_hudmessage(24, 190, 220, 0.25, 0.2, 0, 6.0, 6.0);
  42. ShowSyncHudMsg(0, g_Hudmsg, "Vip %s wbija na serwer !",g_Name);
  43. }
  44. public client_disconnect(id){
  45. if(g_Vip[id]){
  46. client_disconnect_vip(id);
  47. }
  48. }
  49. public client_disconnect_vip(id){
  50. g_Vip[id]=false;
  51. }
  52. public SpawnedEventPre(id){
  53. if(g_Vip[id]){
  54. if(is_user_alive(id)){
  55. SpawnedEventPreVip(id);
  56. }
  57. }
  58. }
  59. public SpawnedEventPreVip(id){
  60. set_user_gravity(id, 755.0/800.0);
  61. skoki[id]=1;
  62. set_user_health(id, get_user_health(id)+60);
  63. cs_set_user_armor(id, min(cs_get_user_armor(id,armortype)+100, 300), armortype);
  64. cs_set_user_nvg(id);
  65. }
  66. Ham:get_player_resetmaxspeed_func(){
  67. #if defined Ham_CS_Player_ResetMaxSpeed
  68. return IsHamValid(Ham_CS_Player_ResetMaxSpeed)?Ham_CS_Player_ResetMaxSpeed:Ham_Item_PreFrame;
  69. #else
  70. return Ham_Item_PreFrame;
  71. #endif
  72. }
  73. public fw_Player_ResetMaxSpeed(id){
  74. if(g_Vip[id]){
  75. if(is_user_alive(id)){
  76. fw_Player_ResetMaxSpeedVip(id);
  77. }
  78. }
  79. }
  80. public logevent_round_start(){
  81. g_FreezeTime=false;
  82. }
  83. public event_new_round(){
  84. g_FreezeTime=true;
  85. }
  86. public fw_Player_ResetMaxSpeedVip(id){
  87. if(!g_FreezeTime){
  88. set_user_maxspeed(id,get_user_maxspeed(id) + 40);
  89. }
  90. }
  91. public CmdStartPre(id, uc_handle){
  92. if(g_Vip[id]){
  93. if(is_user_alive(id)){
  94. CmdStartPreVip(id, uc_handle);
  95. }
  96. }
  97. }
  98. public CmdStartPreVip(id, uc_handle){
  99. new flags = pev(id, pev_flags);
  100. if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){
  101. --skoki[id];
  102. new Float:velocity[3];
  103. pev(id, pev_velocity,velocity);
  104. velocity[2] = random_float(265.0,285.0);
  105. set_pev(id,pev_velocity,velocity);
  106. } else if(flags & FL_ONGROUND && skoki[id]!=-1){
  107. skoki[id] = 1;
  108. }
  109. }
  110. public plugin_cfg(){
  111. maxPlayers=get_maxplayers();
  112. }
  113. public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
  114. if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) ||
  115. (ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){
  116. damage*=(100+30)/100;
  117. }
  118. }
  119. public DeathMsg(){
  120. new killer=read_data(1);
  121. new victim=read_data(2);
  122.  
  123. if(is_user_alive(killer) && g_Vip[killer] && get_user_team(killer) != get_user_team(victim)){
  124. DeathMsgVip(killer,victim,read_data(3));
  125. }
  126. }
  127. public DeathMsgVip(kid,vid,hs){
  128. set_user_health(kid, min(get_user_health(kid)+(hs?10:5),130));
  129. }
  130. public VipStatus(){
  131. new id=get_msg_arg_int(1);
  132. if(is_user_alive(id) && g_Vip[id]){
  133. set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
  134. }
  135. }
  136. public VipChat(id){
  137. if(g_Vip[id]){
  138. new g_Msg[256],
  139. g_Text[256];
  140.  
  141. read_args(g_Msg,charsmax(g_Msg));
  142. remove_quotes(g_Msg);
  143.  
  144. if(g_Msg[0] == '*' && g_Msg[1]){
  145. new g_Name[64];
  146. get_user_name(id,g_Name,charsmax(g_Name));
  147.  
  148. formatex(g_Text,charsmax(g_Text),"^x01(%s) ^x03%s : ^x04%s",g_Prefix, g_Name, g_Msg[1]);
  149.  
  150. for(new i=1;i<33;i++){
  151. if(is_user_connected(i) && g_Vip[i])
  152. ColorChat(i, GREEN, "%s", g_Text);
  153. }
  154. return PLUGIN_HANDLED_MAIN;
  155. }
  156. }
  157. return PLUGIN_CONTINUE;
  158. }
  159. public handleSayText(msgId,msgDest,msgEnt){
  160. new id = get_msg_arg_int(1);
  161.  
  162. if(is_user_connected(id) && g_Vip[id]){
  163. new szTmp[256],szTmp2[256];
  164. get_msg_arg_string(2,szTmp, charsmax(szTmp))
  165.  
  166. new szPrefix[64] = "^x04[VIP]";
  167.  
  168. if(!equal(szTmp,"#Cstrike_Chat_All")){
  169. add(szTmp2,charsmax(szTmp2),szPrefix);
  170. add(szTmp2,charsmax(szTmp2)," ");
  171. add(szTmp2,charsmax(szTmp2),szTmp);
  172. }
  173. else{
  174. add(szTmp2,charsmax(szTmp2),szPrefix);
  175. add(szTmp2,charsmax(szTmp2),"^x03 %s1^x01 : %s2");
  176. }
  177. set_msg_arg_string(2,szTmp2);
  178. }
  179. return PLUGIN_CONTINUE;
  180. }
  181. public amxbans_admin_connect(id){
  182. client_authorized(id);
  183. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement