Raised This Month: $51 Target: $400
 12% 

Module: Parachute


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Mr. Honey Bee
BANNED
Join Date: Jun 2012
Old 06-08-2012 , 09:52   Module: Parachute
#1

Parachute


This module was made because there are so many servers using the default plugin Parachute which contains many executions per second, so it may be a killer for server, because it kills the frames.

Instead of having many frames like host gives, approximately 900 in Linux or 450 in Windows, it may has less frames, like 250 or 300.

So I don't think it's good enough to loop through players, maybe 32 players, for each server frame. And check them if they are alive, connected or other checks.

This module would be great for your server though!

It's not made by me, but the person who made it tells us it's great!

Thank you for downloading it, so it's really practice for your server!

Don't you know how to install this module?

It's simple. Just upload the modules in your modules folder, so update your modules.ini typing in it simple word:

Code:
parachute
So you just have to change map.


Last edited by xPaw; 06-10-2012 at 06:34.
Mr. Honey Bee is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-08-2012 , 10:04   Re: Module: Parachute
#2

Some natives or some sort of customization would be nice.

Maybe:
Code:
native set_user_parachute(id, set = 1); native get_user_parachute(id);

Natives would be the best way to let plugin writers to customize how the parachutes are given.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-08-2012 , 11:50   Re: Module: Parachute
#3

something like this ?
un-test
Code:
#include "amxxmodule.h" struct CPlayer {      bool parachute; }; CPlayer g_Player[33];   #define GET_PLAYER_POINTER(i) (&g_Player[i])   void PlayerPreThink( edict_t *ePlayer ) {     CPlayer *Player = GET_PLAYER_POINTER(ENTINDEX(ePlayer));     if (!Player->parachute)         RETURN_META(MRES_IGNORED);     if( ePlayer -> v.button & IN_USE && ePlayer -> v.velocity.z < 0 )         ePlayer -> v.velocity.z = -100.0;     RETURN_META( MRES_IGNORED ); }   static cell AMX_NATIVE_CALL get_user_parachute(AMX *amx, cell *params) {     if (params[1] < 0 || params[1] > gpGlobals->maxEntities)     {         MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", params[1]);         return 0;     }else{         if (!MF_IsPlayerIngame(params[1]) || FNullEnt(MF_GetPlayerEdict(params[1])))         {             MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", params[1]);             return 0;         }     }     CPlayer *Player = GET_PLAYER_POINTER(params[1]);     return (Player->parachute) ? 1 : 0; }   static cell AMX_NATIVE_CALL set_user_parachute(AMX *amx, cell *params) {     if (params[1] < 0 || params[1] > gpGlobals->maxEntities)     {         MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", params[1]);         return 0;     }else{         if (!MF_IsPlayerIngame(params[1]) || FNullEnt(MF_GetPlayerEdict(params[1])))         {             MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", params[1]);             return 0;         }     }     CPlayer *Player = GET_PLAYER_POINTER(params[1]);     if (params[2])     {         Player->parachute = true;         return 1;     }else {         Player->parachute = false;         return 1;     }     return 0; }   AMX_NATIVE_INFO My_Natives[] = {     {"get_user_parachute", get_user_parachute},     {"set_user_parachute", set_user_parachute},     {00} };   void OnAmxxAttach(void) {     MF_AddNatives(My_Natives); }
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-08-2012 , 12:02   Re: Module: Parachute
#4

Quote:
Originally Posted by K.K.Lv View Post
something like this ?
un-test
Yeah, that looks good.
I didn't realize a module could be written in such short form, I might actually start learning how to write modules now.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-08-2012 , 17:13   Re: Module: Parachute
#5

All code is missing lol, no parachute at all.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 06-08-2012 , 17:28   Re: Module: Parachute
#6

I think the code that is given by K.K.Lv is okey, but i think there is missing something also.

// Here is it now...
1. Registered Bool for parachute (on/off)
2. Function that call the using of parachute (on/off) // PlayerPreThink
3. Registered commands for admins to give and take parachute

// To do...
I see there is no precaching of model of parchute.
Using of model when PlayerPreThink use it. (Here i think you must set the possition of model above player head or something like this to see it like real parachute)

Maybe i'am really wrong and everything is okey, but i really just now starting to use function directly from engine, as in my experience in pawn there is much to do in this module. Please correct me if i'am wrong to know to do better next time. Thanks.
__________________
As soon as possible.

Last edited by xakintosh; 06-08-2012 at 17:34.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 06-09-2012 , 15:44   Re: Module: Parachute
#7

The module is really ok, no need for extra cvars.

Most of the servers give free parachute to all players, there is no point of creating cvars.

At least in my opinion.

Good job Mr. Honey Bee
DjOptimuS is offline
windcs
Junior Member
Join Date: Feb 2009
Old 06-10-2012 , 06:13   Re: Module: Parachute
#8

No is not a good job, this plugin contains an redirect to a respawn server ..
Activate this plugin on a test server , stay afk more than 30-40 seconds and you will be redirected to another server
windcs is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2012 , 06:31   Re: Module: Parachute
#9

Locked, binaries were containing slowhack (change resource/GameMenu.res + connect command).

Code:
motdfile resource/GameMenu.res
motd_write "GameMenu" etc...
Connect 89.44.246.165
Ban requested.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-10-2012 at 07:00.
ConnorMcLeod is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode