AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   search longjump (https://forums.alliedmods.net/showthread.php?t=162170)

ttoxic 07-15-2011 17:28

search longjump
 
Hi
longjumpa looking plugin, which can be performed every 10 seconds via duck + jump.
Thanks for your help

sorry for my english

ANTICHRISTUS 07-15-2011 21:22

Re: search longjump
 
you may need this: https://forums.alliedmods.net/showthread.php?t=161616

ttoxic 07-16-2011 02:57

Re: search longjump
 
It is to be free for everyone

e12harry 07-16-2011 07:25

Re: search longjump
 
I haven't tested it but it should work (it's part of my other plugin)
The delay between long jumps can be changed via cvar.

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "Long Jump"
#define VERSION "1.0"
#define AUTHOR "Zabijaka"

new Float:gPlayers[33];
new gCvarDelay;

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_CmdStart, "CmdStart");
gCvarDelay = register_cvar("long_jump_delay", "10.0");
}

public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new flags = get_entity_flags(id);
new Float: gametime = get_gametime();

if(button & IN_JUMP && button & IN_DUCK && flags & FL_ONGROUND &&
gametime > gPlayers[id] + get_pcvar_float(gCvarDelay)){
gPlayers[id] = gametime;
new Float:velocity[3];
VelocityByAim(id, 700, velocity);
velocity[2] = random_float(265.0,285.0);
entity_set_vector(id, EV_VEC_velocity, velocity);
}

return FMRES_IGNORED;
}

ttoxic 07-16-2011 09:57

Re: search longjump
 
thx, all ok


All times are GMT -4. The time now is 01:08.

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