hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.30. 18:05



Jelenlévő felhasználók

Jelenleg 290 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 288 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Google [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Plugint egybe írni
HozzászólásElküldve: 2014.08.24. 21:30 
Sziasztok valaki eszt a 3 plugint egybe írni hogy működjön is nincs hozzá sma!
ez a 3 plugin kellene
1.No fall damage
2.hook
3.notrapp
eszt egy jogra kellene olyanra ami nem sok mindent csinál mert vip lesz


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Plugint egybe írni
HozzászólásElküldve: 2014.08.25. 11:56 
Offline
Veterán
Avatar

Csatlakozott: 2011.06.07. 15:29
Hozzászólások: 1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
Tesztelve, működik.
A csodajog az ADMIN_LEVEL_H (users.ini-ben a "t" jog)

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <engine>
  3. #include <amxmisc>
  4. #include <fun>
  5.  
  6. #define FALL_VELOCITY 350.0
  7.  
  8.  
  9. #define TE_BEAMENTPOINT 1
  10. #define TE_KILLBEAM 99
  11. #define DELTA_T 0.1 // seconds
  12. #define BEAMLIFE 100 // deciseconds
  13. #define MOVEACCELERATION 150 // units per second^2
  14. #define REELSPEED 300 // units per second
  15.  
  16. new gModName[32] = "AMXX"
  17. new gHookLocation[33][3]
  18. new gHookLenght[33]
  19. new bool:gIsHooked[33]
  20. new gAllowedHook[33]
  21. new Float:gBeamIsCreated[33]
  22. new global_gravity
  23. new beam
  24.  
  25. new bool:falling[33];
  26.  
  27. public plugin_init() {
  28. register_plugin("3 in 1", "1.0", "ruszki");
  29.  
  30.  
  31. if(!cvar_exists("mp_falldamage")) {
  32. register_cvar("mp_falldamage", "0");
  33. }
  34.  
  35. register_cvar("sv_adminhook", "1" )
  36.  
  37. //ADMIN CMDS
  38. register_concmd("amx_granthook","AdminGrantHook",ADMIN_LEVEL_A,"<authid, nick, @team, @all or #userid> <on/off>")
  39.  
  40. //USER COMMANDS
  41. register_clcmd("+rope", "hook_on",ADMIN_LEVEL_E)
  42. register_clcmd("-rope", "hook_off",ADMIN_LEVEL_E)
  43. register_clcmd("+hook", "hook_on",ADMIN_LEVEL_E)
  44. register_clcmd("-hook", "hook_off",ADMIN_LEVEL_E)
  45.  
  46. //HOOKED EVENTS
  47. register_event("ResetHUD", "ResetHUD", "b")
  48. }
  49.  
  50.  
  51.  
  52. public client_PreThink(id) {
  53. if(get_cvar_num("mp_falldamage") == 0 && is_user_alive(id) && is_user_connected(id) && get_user_flags(id)&ADMIN_LEVEL_H)
  54. {
  55. if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) {
  56. falling[id] = true;
  57. } else {
  58. falling[id] = false;
  59. }
  60. }
  61. }
  62.  
  63. public client_PostThink(id) {
  64. if(get_cvar_num("mp_falldamage") == 0 && is_user_alive(id) && is_user_connected(id) && get_user_flags(id)&ADMIN_LEVEL_H)
  65. {
  66. if(falling[id])
  67. {
  68. entity_set_int(id, EV_INT_watertype, -3);
  69. }
  70. }
  71. }
  72.  
  73. public plugin_precache()
  74. {
  75. beam = precache_model("sprites/zbeam4.spr")
  76. precache_sound("weapons/xbow_hit2.wav")
  77. }
  78.  
  79. public ResetHUD(id) {
  80. //Check if he is hooked to something
  81. if (gIsHooked[id]) RopeRelease(id)
  82.  
  83. if(get_user_flags(id)&ADMIN_LEVEL_H)
  84. set_user_footsteps(id, 1)
  85. }
  86.  
  87. stock kz_velocity_set(id,vel[3]) {
  88. //Set Their Velocity to 0 so that they they fall straight down from
  89. new Float:Ivel[3]
  90. Ivel[0]=float(vel[0])
  91. Ivel[1]=float(vel[1])
  92. Ivel[2]=float(vel[2])
  93. entity_set_vector(id, EV_VEC_velocity, Ivel)
  94. }
  95.  
  96. stock kz_velocity_get(id,vel[3]) {
  97. //Set Their Velocity to 0 so that they they fall straight down from
  98. new Float:Ivel[3]
  99.  
  100. entity_get_vector(id, EV_VEC_velocity, Ivel)
  101. vel[0]=floatround(Ivel[0])
  102. vel[1]=floatround(Ivel[1])
  103. vel[2]=floatround(Ivel[2])
  104. }
  105.  
  106. public AdminGrantHook(id,level,cid)
  107. {
  108. if ( !cmd_access(id,level,cid,1) )
  109. return PLUGIN_HANDLED
  110.  
  111. new arg1[32],arg2[32]
  112. read_argv(1,arg1,31)
  113. read_argv(2,arg2,31)
  114. new onoff = str_to_num(arg2)
  115.  
  116. if ( equali(arg1,"@all") )
  117. {
  118. new plist[32],pnum
  119. get_players(plist,pnum,"a")
  120. if (pnum==0)
  121. {
  122. console_print(id,"[%s] Nincsenek kliensek",gModName)
  123. return PLUGIN_HANDLED
  124. }
  125. for (new i=0; i<pnum; i++) {
  126. gAllowedHook[plist[i]]=onoff
  127. if (gIsHooked[plist[i]]==true && onoff==0)
  128. {
  129. RopeRelease(plist[i])
  130. }
  131. }
  132.  
  133. console_print(id,"[%s] %s minden jatekosnal aktivalta a hook/rope parancsot",gModName,onoff ? "Adva":"Torolve")
  134. }
  135. else if ( arg1[0]=='@' )
  136. {
  137. new plist[32],pnum
  138. get_players(plist,pnum,"ae",arg1[1])
  139. if ( pnum==0 )
  140. {
  141. console_print(id,"[%s] Nincs kliens ebben a csapatban",gModName)
  142. return PLUGIN_HANDLED
  143. }
  144. for (new i=0; i<pnum; i++) {
  145. gAllowedHook[plist[i]]=onoff
  146. if (gIsHooked[plist[i]]==true && onoff==0)
  147. {
  148. RopeRelease(plist[i])
  149. }
  150. }
  151. console_print(id,"[%s] %s minden %ss -nek aktivalta a hook/rope parancsot",onoff ? "Adva":"Torolve",arg1[1])
  152. }
  153. else
  154. {
  155. new pName[32]
  156. new player = cmd_target(id,arg1,6)
  157. if (!player) return PLUGIN_HANDLED
  158.  
  159. gAllowedHook[player]=onoff
  160. if (gAllowedHook[player]==0 && onoff==0)
  161. {
  162. RopeRelease(player)
  163. }
  164.  
  165.  
  166. get_user_name(player,pName,31)
  167. console_print(id,"[%s] %s ^"%s^" -nak aktivalta a hook/rope parancsot",onoff ? "Adva":"Torolve",pName)
  168. }
  169.  
  170. return PLUGIN_HANDLED
  171. }
  172.  
  173. public ropetask(parm[])
  174. {
  175. new id = parm[0]
  176. new user_origin[3], user_look[3], user_direction[3], move_direction[3]
  177. new A[3], D[3], buttonadjust[3]
  178. new acceleration, velocity_towards_A, desired_velocity_towards_A
  179. new velocity[3], null[3]
  180.  
  181. if (!is_user_alive(id))
  182. {
  183. RopeRelease(id)
  184. return
  185. }
  186.  
  187. if (gBeamIsCreated[id] + BEAMLIFE/10 <= get_gametime())
  188. {
  189. beamentpoint(id)
  190. }
  191.  
  192. null[0] = 0
  193. null[1] = 0
  194. null[2] = 0
  195.  
  196. get_user_origin(id, user_origin)
  197. get_user_origin(id, user_look,2)
  198. kz_velocity_get(id, velocity)
  199.  
  200. buttonadjust[0]=0
  201. buttonadjust[1]=0
  202.  
  203. if (get_user_button(id)&IN_FORWARD) buttonadjust[0]+=1
  204. if (get_user_button(id)&IN_BACK) buttonadjust[0]-=1
  205. if (get_user_button(id)&IN_MOVERIGHT) buttonadjust[1]+=1
  206. if (get_user_button(id)&IN_MOVELEFT) buttonadjust[1]-=1
  207. if (get_user_button(id)&IN_JUMP) buttonadjust[2]+=1
  208. if (get_user_button(id)&IN_DUCK) buttonadjust[2]-=1
  209.  
  210. if (buttonadjust[0] || buttonadjust[1])
  211. {
  212. user_direction[0] = user_look[0] - user_origin[0]
  213. user_direction[1] = user_look[1] - user_origin[1]
  214.  
  215. move_direction[0] = buttonadjust[0]*user_direction[0] + user_direction[1]*buttonadjust[1]
  216. move_direction[1] = buttonadjust[0]*user_direction[1] - user_direction[0]*buttonadjust[1]
  217. move_direction[2] = 0
  218.  
  219. velocity[0] += floatround(move_direction[0] * MOVEACCELERATION * DELTA_T / get_distance(null,move_direction))
  220. velocity[1] += floatround(move_direction[1] * MOVEACCELERATION * DELTA_T / get_distance(null,move_direction))
  221. }
  222.  
  223. if (buttonadjust[2]) gHookLenght[id] -= floatround(buttonadjust[2] * REELSPEED * DELTA_T)
  224. if (gHookLenght[id] < 100) gHookLenght[id] = 100
  225.  
  226. A[0] = gHookLocation[id][0] - user_origin[0]
  227. A[1] = gHookLocation[id][1] - user_origin[1]
  228. A[2] = gHookLocation[id][2] - user_origin[2]
  229.  
  230. D[0] = A[0]*A[2] / get_distance(null,A)
  231. D[1] = A[1]*A[2] / get_distance(null,A)
  232. D[2] = -(A[1]*A[1] + A[0]*A[0]) / get_distance(null,A)
  233.  
  234. acceleration = - global_gravity * D[2] / get_distance(null,D)
  235.  
  236. velocity_towards_A = (velocity[0] * A[0] + velocity[1] * A[1] + velocity[2] * A[2]) / get_distance(null,A)
  237. desired_velocity_towards_A = (get_distance(user_origin,gHookLocation[id]) - gHookLenght[id] /*- 10*/) * 4
  238.  
  239. if (get_distance(null,D)>10)
  240. {
  241. velocity[0] += floatround((acceleration * DELTA_T * D[0]) / get_distance(null,D))
  242. velocity[1] += floatround((acceleration * DELTA_T * D[1]) / get_distance(null,D))
  243. velocity[2] += floatround((acceleration * DELTA_T * D[2]) / get_distance(null,D))
  244. }
  245.  
  246. velocity[0] += ((desired_velocity_towards_A - velocity_towards_A) * A[0]) / get_distance(null,A)
  247. velocity[1] += ((desired_velocity_towards_A - velocity_towards_A) * A[1]) / get_distance(null,A)
  248. velocity[2] += ((desired_velocity_towards_A - velocity_towards_A) * A[2]) / get_distance(null,A)
  249.  
  250. kz_velocity_set(id, velocity)
  251. }
  252.  
  253. public hooktask(parm[])
  254. {
  255. new id = parm[0]
  256. new velocity[3]
  257.  
  258. if ( !gIsHooked[id] ) return
  259.  
  260. new user_origin[3],oldvelocity[3]
  261. parm[0] = id
  262.  
  263. if (!is_user_alive(id))
  264. {
  265. RopeRelease(id)
  266. return
  267. }
  268.  
  269. if (gBeamIsCreated[id] + BEAMLIFE/10 <= get_gametime())
  270. {
  271. beamentpoint(id)
  272. }
  273.  
  274. get_user_origin(id, user_origin)
  275. kz_velocity_get(id, oldvelocity)
  276. new distance=get_distance( gHookLocation[id], user_origin )
  277. if ( distance > 10 )
  278. {
  279. velocity[0] = floatround( (gHookLocation[id][0] - user_origin[0]) * ( 2.0 * REELSPEED / distance ) )
  280. velocity[1] = floatround( (gHookLocation[id][1] - user_origin[1]) * ( 2.0 * REELSPEED / distance ) )
  281. velocity[2] = floatround( (gHookLocation[id][2] - user_origin[2]) * ( 2.0 * REELSPEED / distance ) )
  282. }
  283. else
  284. {
  285. velocity[0]=0
  286. velocity[1]=0
  287. velocity[2]=0
  288. }
  289.  
  290. kz_velocity_set(id, velocity)
  291.  
  292. }
  293.  
  294. public hook_on(id)
  295. {
  296. if (get_cvar_num("sv_adminhook")==1)
  297. {
  298. if (gAllowedHook[id] || (get_user_flags(id)&ADMIN_LEVEL_H)) {
  299. if (!gIsHooked[id] && is_user_alive(id))
  300. {
  301. new cmd[32]
  302. read_argv(0,cmd,31)
  303. if(equal(cmd,"+rope")) RopeAttach(id,0)
  304. if(equal(cmd,"+hook")) RopeAttach(id,1)
  305. }
  306. }else{
  307. client_print(id,print_chat,"[%s] Nincs hozzaferesed ehhez a parancshoz",gModName)
  308. return PLUGIN_HANDLED
  309. }
  310. }else{
  311. client_print(id,print_chat,"[%s] Ez a parancs inaktiv",gModName)
  312. }
  313. return PLUGIN_HANDLED
  314. }
  315.  
  316. public hook_off(id)
  317. {
  318. if (gAllowedHook[id] || (get_user_flags(id)&ADMIN_LEVEL_H)) {
  319. if (gIsHooked[id])
  320. {
  321. RopeRelease(id)
  322. }
  323. }else{
  324. client_print(id,print_chat,"[%s] Nincs hozzaferesed ehhez a parancshoz",gModName)
  325. return PLUGIN_HANDLED
  326. }
  327. return PLUGIN_HANDLED
  328. }
  329.  
  330. public RopeAttach(id,hook)
  331. {
  332. new parm[1], user_origin[3]
  333. parm[0] = id
  334. gIsHooked[id] = true
  335. get_user_origin(id,user_origin)
  336. get_user_origin(id,gHookLocation[id], 3)
  337. gHookLenght[id] = get_distance(gHookLocation[id],user_origin)
  338. global_gravity = get_cvar_num("sv_gravity")
  339. set_user_gravity(id,0.001)
  340. beamentpoint(id)
  341. emit_sound(id, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  342. if (hook) set_task(DELTA_T, "hooktask", 200+id, parm, 1, "b")
  343. else set_task(DELTA_T, "ropetask", 200+id, parm, 1, "b")
  344. }
  345.  
  346. public RopeRelease(id)
  347. {
  348. gIsHooked[id] = false
  349. killbeam(id)
  350. set_user_gravity(id)
  351. remove_task(200+id)
  352. }
  353.  
  354. public beamentpoint(id)
  355. {
  356. message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  357. write_byte( TE_BEAMENTPOINT )
  358. write_short( id )
  359. write_coord( gHookLocation[id][0] )
  360. write_coord( gHookLocation[id][1] )
  361. write_coord( gHookLocation[id][2] )
  362. write_short( beam ) // sprite index
  363. write_byte( 0 ) // start frame
  364. write_byte( 0 ) // framerate
  365. write_byte( BEAMLIFE ) // life
  366. write_byte( 10 ) // width
  367. write_byte( 0 ) // noise
  368. if (get_user_team(id)==1) // Terrorist
  369. {
  370. write_byte( 255 ) // r, g, b
  371. write_byte( 0 ) // r, g, b
  372. write_byte( 0 ) // r, g, b
  373. }
  374. else // Counter-Terrorist
  375. {
  376. write_byte( 0 ) // r, g, b
  377. write_byte( 0 ) // r, g, b
  378. write_byte( 255 ) // r, g, b
  379. }
  380. write_byte( 150 ) // brightness
  381. write_byte( 0 ) // speed
  382. message_end( )
  383. gBeamIsCreated[id] = get_gametime()
  384. }
  385.  
  386. public killbeam(id)
  387. {
  388. message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  389. write_byte( TE_KILLBEAM )
  390. write_short( id )
  391. message_end()
  392. }
  393.  
  394. public client_disconnect(id) {
  395. gAllowedHook[id]=0
  396. }


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Plugint egybe írni
HozzászólásElküldve: 2014.08.25. 15:53 
Köszönöm szépen nagyon! :D :D :D
Csak a nofalldamage most me mukodik nekem de más szeron igen :(
Plugin lista:
Kód:
UltimateBanssma.amxx
; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx      ; admin base (required for any admin-related)
;admin_sql.amxx      ; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx      ; basic admin console commands
adminhelp.amxx      ; help command for admin console commands
adminslots.amxx      ; slot reservation
multilingual.amxx   ; Multi-Lingual management

; Menus
menufront.amxx      ; front-end for admin menus
cmdmenu.amxx      ; command menu (speech, settings)
plmenu.amxx      ; players menu (kick, ban, client cmds.)
;telemenu.amxx      ; teleport menu (Fun Module required!)
mapsmenu.amxx      ; maps menu (vote, changelevel)
pluginmenu.amxx      ; Menus for commands/cvars organized by plugin

; Chat / Messages
adminchat.amxx      ; console chat commands
antiflood.amxx      ; prevent clients from chat-flooding the server
scrollmsg.amxx      ; displays a scrolling message
imessage.amxx      ; displays information messages
adminvote.amxx      ; vote commands

; Map related
nextmap.amxx      ; displays next map in mapcycle
mapchooser.amxx      ; allows to vote for next map
timeleft.amxx      ; displays time left on map

; Configuration
pausecfg.amxx      ; allows to pause and unpause some plugins
statscfg.amxx      ; allows to manage stats plugins via menu and commands

; Counter-Strike
;restmenu.amxx      ; restrict weapons menu
statsx.amxx      ; stats on death or round end (CSX Module required!)
;miscstats.amxx      ; bunch of events announcement for Counter-Strike
;stats_logging.amxx   ; weapons stats logging (CSX Module required!)

; Enable to use AMX Mod plugins
;amxmod_compat.amxx   ; AMX Mod backwards compatibility layer

; Custom - Add 3rd party plugins here
admin_freelook.amxx
GHW_Floating_Weapons.amxx
amx_gore_ultimate.amxx
amx_login.amxx
amx_parachute.amxx
colored_flashbangs.amxx
grenade_trail.amxx
mapveg.amxx
multijump.amxx
weapon_icon.amxx
sebzes.amxx
rang_katonai.amxx
afk_kirugo.amxx
ultimatesounds.amxx
reklam.amxx
fegyver.amxx
statisztika.amxx
kor_legjobbja.amxx
menufront.amxx
adminvote.amxx
amx_destroy.amxx
oles_uzenet.amxx
gyozelmi_uzenet.amxx
ZENE_KORVEGI.amxx
ColoredSmokesma.amxx
KP_FIXsma.amxx
amx_banshot.amxx
adminbuy.amxx
fegyver_model.amxx
gyorskes.amxx
GHW_csatlakozosma.amxx
fraglopas.amxx
speclist.amxx
death_weapons_drop.amxx
cs_team_semiclip.amxx
swear_filter.amxx
mapconfigsma.amxx
hirdetestilto.amxx
Granatnev.amxx
knife_selector.amxx
bombarobbanas.amxx
hun_adminsma.amxx
sillyc4.amxx
Bombalerako_zarolas.amxx
Rank.amxx
Menu.amxx
autobinds.amxx
luciaHallucination.amxx
knife_bunny_hopsma.amxx
adminhook.amxx
fejlovessma.amxx
VIP_ALL.amxx


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 3 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 51 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole