User
Pass
2FA
 
 

Need Help

 
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) -> Fixed issues
Author Message813
^SaD*^

[Mentally Stable]



Status: Offline
(since 03-03-2019 23:50)
Joined: 10 Dec 2014
Posts: 289, Topics: 44
Location: Germany

Reputation: 159
Votes: 5

     
Post Posted: 19-09-2015, 12:08:42 | Translate post to: ... (Click for more languages)

Salutare ... am si eu niste erori intr.un plugin , ma poate ajuta cineva ?
Code:
 09/19/2015 - 13:07:21: [AMXX] Run time error 4: index out of bounds
L 09/19/2015 - 13:07:21: [AMXX] [0] 86q0bayd.sma.p::fwd_touch (line 80)
L 09/19/2015 - 13:07:21: [AMXX] Displaying debug trace (plugin "zp_zclass_climb.amxx")


Sma Plugin


Code:
#include <amxmodx>

#include <engine>

#include <fakemeta>

#include <cstrike>

#include <zombieplague>



#define STR_T 33

#define fm_get_user_button(%1) pev(%1, pev_button)

#define fm_get_entity_flags(%1) pev(%1, pev_flags)

#pragma tabsize 0



stock fm_set_user_velocity(entity, const Float:vector[3]) {



set_pev(entity, pev_velocity, vector);







return 1;



}



new bool:g_WallClimb[33]

new Float:g_wallorigin[32][3]

new cvar_zp_wallclimb, cvar_zp_wallclimb_nemesis, cvar_zp_wallclimb_survivor

new g_zclass_climb





new const zclass_name[] = { "Climb Zombie" } // name

new const zclass_info[] = { "HP-- Speed+ Jump+ Knockback++" } // description

new const zclass_model[] = { "climb_frk_14" } // model

new const zclass_clawmodel[] = { "v_knife_climb.mdl" } // claw model

const zclass_health = 1200 // health

const zclass_speed = 220 // speed

const Float:zclass_gravity = 0.8 // gravity

const Float:zclass_knockback = 1.5 // knockback



public plugin_init()



{

register_plugin("[ZP] Wallclimb ", "1.0", "WallClimb by Python1320/Cheap_Suit, Plagued by Dabbi")

register_forward(FM_Touch, "fwd_touch")

register_forward(FM_PlayerPreThink, "fwd_playerprethink")

register_event("DeathMsg","EventDeathMsg","a")

cvar_zp_wallclimb = register_cvar("zp_wallclimb", "1")

cvar_zp_wallclimb_survivor = register_cvar("zp_wallclimb_survivor", "0")

cvar_zp_wallclimb_nemesis = register_cvar("zp_wallclimb_nemesis", "1")

}







public plugin_precache()



{

g_zclass_climb = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)

}

public EventDeathMsg()

{

new id = read_data(2)

g_WallClimb[id] = true

return PLUGIN_HANDLED

}

public client_connect(id) {

g_WallClimb[id] = true

}

public fwd_touch(id, world)

{

if(!is_user_alive(id) || !g_WallClimb[id] || !pev_valid(id))

return FMRES_IGNORED

if( !is_valid_ent( world ) || !pev_valid(world))

return FMRES_IGNORED;

new player = STR_T



if (!player)

return FMRES_IGNORED



new classname[STR_T]

pev(world, pev_classname, classname, (STR_T))



if(equal(classname, "worldspawn") || equal(classname, "func_wall") || equal(classname, "func_breakable"))

pev(id, pev_origin, g_wallorigin[id])



return FMRES_IGNORED

}







public wallclimb(id, button)



{

static Float:origin[3]

pev(id, pev_origin, origin)

if(get_distance_f(origin, g_wallorigin[id]) > 25.0)



return FMRES_IGNORED





if(fm_get_entity_flags(id) & FL_ONGROUND)



return FMRES_IGNORED







if(button & IN_FORWARD)



{



static Float:velocity[3]



velocity_by_aim(id, 120, velocity)



fm_set_user_velocity(id, velocity)



}



else if(button & IN_BACK)



{



static Float:velocity[3]



velocity_by_aim(id, -120, velocity)



fm_set_user_velocity(id, velocity)



}



return FMRES_IGNORED



}







public fwd_playerprethink(id)



{



if(!g_WallClimb[id] || !zp_get_user_zombie(id))



return FMRES_IGNORED







if(zp_is_survivor_round() && get_pcvar_num(cvar_zp_wallclimb_survivor) == 0)



return FMRES_IGNORED







if(zp_is_nemesis_round() && get_pcvar_num(cvar_zp_wallclimb_nemesis) == 0)



return FMRES_IGNORED







new button = fm_get_user_button(id)







if((get_pcvar_num(cvar_zp_wallclimb) == 1) && (button & IN_USE) && (zp_get_user_zombie_class(id) == g_zclass_climb)) //Use button = climb



wallclimb(id, button)



else if((get_pcvar_num(cvar_zp_wallclimb) == 2) && (button & IN_JUMP) && button & IN_DUCK && (zp_get_user_zombie_class(id) == g_zclass_climb)) //Jump + Duck = climb



wallclimb(id, button)







return FMRES_IGNORED



}

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 20-09-2015, 07:53:10 | Translate post to: ... (Click for more languages)

Spoiler:



Retired from Amxmodx

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

[Mentally Stable]



Status: Offline
(since 03-03-2019 23:50)
Joined: 10 Dec 2014
Posts: 289, Topics: 44
Location: Germany

Reputation: 159
Votes: 5

     
Post Posted: 20-09-2015, 16:55:24 | Translate post to: ... (Click for more languages)

Mersi T/C
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


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

Locked by -P!C@-, 20 September 2015 15:27



 
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) -> Fixed issues  


The time now is 26-05-2025, 02:38:48
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