User
Pass
2FA
 
 

[rezolvat]Cerere plugin amx_parachute

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message1046
new_holland6
[Banned user]


Banned


Status: Offline
(since 30-12-2014 22:03)
Joined: 23 Dec 2014
Posts: 9, Topics: 2
Location: Brasov

Reputation: 61.3
Votes: 2

   
Post Posted: 29-12-2014, 00:04:01 | Translate post to: ... (Click for more languages)

Salut, am un server de Zombie Mod, si am pus un plugin cu parasuta free, toate bune si frumoase, daca scrii in chat buy_parachute iti zice ca deja ai una, adica pluginul merge, dar ceva se intampla pt ca nu functioneaza... cred ca este din cauza bindului, eu cred ca nu este setata pe +use (adica E), nu stiu poate mai e si alt plugin ede foloseste E, habar nu am si nu pot sa imi dau seama, am inlocuit pluginul, imi arata ca merge la amx_plugins, si merge pt ca iti confirma in joc, drq sa o ia. Si chiar am nevoie. Poate are cineva timp si chef sa ma ajute. Ma puteti gasi si la YM! : new_holland6

Code:
#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
}
}


Prosti da' multi!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Faydwer

[Licensed to kill]



Status: Offline
(since 17-11-2019 19:30)
Joined: 06 Aug 2011
Posts: 7215, Topics: 383
Location: Italy

Reputation: 92.6
Votes: 410

 
Post Posted: 29-12-2014, 01:31:40 | Translate post to: ... (Click for more languages)

Incearca pluginul asta sau pe asta daca nu merge primul
0 0
  
Back to top
View user's profile Send private message
new_holland6
[Banned user]


Banned


Status: Offline
(since 30-12-2014 22:03)
Joined: 23 Dec 2014
Posts: 9, Topics: 2
Location: Brasov

Reputation: 61.3
Votes: 2

   
Post Posted: 29-12-2014, 02:13:51 | Translate post to: ... (Click for more languages)

N1gHtMaR3 wrote:
Incearca pluginul asta sau pe asta daca nu merge primul


Nu merg, exact la fel fac... Daca executi comenzile de parasuta, ele functioneaza, doar ca pare ca parasuta se activeaza pe alt buton decat USE...
Ne sscapa ceva -


Prosti da' multi!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Faydwer

[Licensed to kill]



Status: Offline
(since 17-11-2019 19:30)
Joined: 06 Aug 2011
Posts: 7215, Topics: 383
Location: Italy

Reputation: 92.6
Votes: 410

 
Post Posted: 29-12-2014, 02:23:37 | Translate post to: ... (Click for more languages)

Ai pus cvarurile corect?
0 0
  
Back to top
View user's profile Send private message
new_holland6
[Banned user]


Banned


Status: Offline
(since 30-12-2014 22:03)
Joined: 23 Dec 2014
Posts: 9, Topics: 2
Location: Brasov

Reputation: 61.3
Votes: 2

   
Post Posted: 29-12-2014, 02:41:11 | Translate post to: ... (Click for more languages)

N1gHtMaR3 wrote:
Ai pus cvarurile corect?


// Parasuta

sv_parachute "1"
parachute_cost "0"
admin_parachute "0"
parachute_payback "75"
para_free "1"

In fisierul zombieplague.cfg Deci eu zic ca pluginul functioneaza 100%, doar ca ori nu e pe USE ori mai am alt plugin si se "íncaleca", desi nu cred ca e asta

Si mai am descoperit o mica problema, daca ai chef sa o auzi si pe aceea iti trimit un msg cu ea - E la o clasa de zombie


Prosti da' multi!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
-P!C@-

[Simply Normal]



Status: Offline
(since 21-04-2022 19:07)
Joined: 28 May 2012
Posts: 21086, Topics: 1601
Location: Constanta

Reputation: 1870.3
Votes: 781

Post Posted: 29-12-2014, 09:05:37 | Translate post to: ... (Click for more languages)

Baga pluginul asta: http://www68.zippyshare.com/v/64966657/file.html
In amxx.cfg scrii asa:
sv_parachute 1
parachute_cost 0




0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by TwisTer, 16 March 2015 13:29



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 24-02-2025, 01:35:55
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x