Raised This Month: $32 Target: $400
 8% 

Free Parachute ~~~ CS 1.6 ~~~


Post New Thread Reply   
 
Thread Tools Display Modes
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 09-08-2011 , 03:44   Re: Free Parachute ~~~ CS 1.6 ~~~
Reply With Quote #21

Quote:
Originally Posted by joshknifer View Post
2.) Don't say "Dont Work" without explaining what you tried.
Actually he told you what didn't work.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
Old 09-08-2011, 11:28
joshknifer
This message has been deleted by joshknifer. Reason: Blah its early
TinchoxD99
Junior Member
Join Date: May 2013
Old 02-03-2014 , 12:51   Re: Free Parachute ~~~ CS 1.6 ~~~
Reply With Quote #22

Hi, amx_parachute @all works. But that user says in ctf or dm mod, it works only the first time, when you respawn you have to re type buy_parachute

I've designed one that is always free without commands and does not have model

Here it is

The plugins is called parachute_wm.amxx

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

new bool:has_parachute[33]
new para_ent[33]
new pDetach, pFallSpeed, pEnabled

public plugin_init()
{
register_plugin("Parachute_wm", "1", "Tinchox")
pEnabled = register_cvar("sv_parachute", "1" )
pFallSpeed = register_cvar("parachute_fallspeed", "100")
pDetach = register_cvar("parachute_detach", "1")

if (cstrike_running())

register_event("ResetHUD", "newSpawn", "be")
register_event("DeathMsg", "death_event", "a")

//Setup jtp10181 CVAR
new cvarString[256], shortName[16]
copy(shortName,15,"chute")

register_cvar("jtp10181","",FCVAR_SERVER|FCVA R_SPONLY)
get_cvar_string("jtp10181",cvarString,255)

if (strlen(cvarString) == 0) {
formatex(cvarString,255,shortName)
set_cvar_string("jtp10181",cvarString)
}
else if (contain(cvarString,shortName) == -1) {
format(cvarString,255,"%s,%s",cvarString, shortName)
set_cvar_string("jtp10181",cvarString)
}
}

public plugin_natives()
{
set_module_filter("module_filter")
set_native_filter("native_filter")
}

public module_filter(const module[])
{
if (!cstrike_running() && equali(module, "cstrike")) {
return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
if (!trap) return PLUGIN_HANDLED

return PLUGIN_CONTINUE
}

public client_connect(id)
{
parachute_reset(id)
}

public client_disconnect(id)
{
parachute_reset(id)
}

public death_event()
{
new id = read_data(2)
parachute_reset(id)
}

parachute_reset(id)
{
has_parachute[id] = true
}

public newSpawn(id)
{
has_parachute[id] = true
}

public client_PreThink(id)
{
//parachute.mdl animation information
//0 - deploy - 84 frames
//1 - idle - 39 frames
//2 - detach - 29 frames

if (!get_pcvar_num(pEnabled)) return
if (!is_user_alive(id) || !has_parachute[id]) return

new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0
new Float:frame

new button = get_user_button(id)
new oldbutton = get_user_oldbutton(id)
new flags = get_entity_flags(id)

if (para_ent[id] > 0 && (flags & FL_ONGROUND)) {

if (get_pcvar_num(pDetach)) {

if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0)

if (entity_get_int(para_ent[id],EV_INT_sequence) != 2) {
entity_set_int(para_ent[id], EV_INT_sequence, 2)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
entity_set_float(para_ent[id], EV_FL_framerate, 0.0)
return
}

frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
entity_set_float(para_ent[id],EV_FL_fuser1,frame)
entity_set_float(para_ent[id],EV_FL_frame,frame)

if (frame > 254.0) {
remove_entity(para_ent[id])
para_ent[id] = 0
}
}
else {
remove_entity(para_ent[id])
set_user_gravity(id, 1.0)
para_ent[id] = 0
}

return
}

if (button & IN_USE) {

new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)

if (velocity[2] < 0.0) {

if(para_ent[id] <= 0) {
para_ent[id] = create_entity("info_target")
if(para_ent[id] > 0) {
entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
entity_set_edict(para_ent[id], EV_ENT_aiment, id)
entity_set_edict(para_ent[id], EV_ENT_owner, id)
entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_int(para_ent[id], EV_INT_sequence, 0)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
}
}

if (para_ent[id] > 0) {

entity_set_int(id, EV_INT_sequence, 3)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, 1.0)
entity_set_float(id, EV_FL_framerate, 1.0)
set_user_gravity(id, 0.1)

velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
entity_set_vector(id, EV_VEC_velocity, velocity)

if (entity_get_int(para_ent[id],EV_INT_sequence) == 0) {

frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
entity_set_float(para_ent[id],EV_FL_fuser1,frame)
entity_set_float(para_ent[id],EV_FL_frame,frame)

if (frame > 100.0) {
entity_set_float(para_ent[id], EV_FL_animtime, 0.0)
entity_set_float(para_ent[id], EV_FL_framerate, 0.4)
entity_set_int(para_ent[id], EV_INT_sequence, 1)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
}
}
}
}
else if (para_ent[id] > 0) {
remove_entity(para_ent[id])
set_user_gravity(id, 1.0)
para_ent[id] = 0
}
}
else if ((oldbutton & IN_USE) && para_ent[id] > 0 ) {
remove_entity(para_ent[id])
set_user_gravity(id, 1.0)
para_ent[id] = 0
}
}

Bye
TinchoxD99 is offline
Send a message via Skype™ to TinchoxD99
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 02-03-2014 , 15:30   Re: Free Parachute ~~~ CS 1.6 ~~~
Reply With Quote #23

  • use tags like [QUOTE], [CODE], or [PHP] if you want to post a long code.
  • it's not so hard to make a free parachute using cvars (coast 0).
__________________

Last edited by ANTICHRISTUS; 02-03-2014 at 15:31.
ANTICHRISTUS is offline
Reply



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 01:32.


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