ok well first i need to know how to set the players velocity so it simulates that he is walking on a was so this means that i want thim to go forwards when he jumps or walks on to a wall
and the seccond thing is when i pres the bindet key i wanna set the players vector angels so it looks like he is walking on a wall like i show on this pic
[img]http://img390.**************/img390/4909/dedust00073vu.jpg[/img]
but when i go to teh other side off the wall i want it to look teh same as i showed in that other pic but it looks like this
[img]http://img237.**************/img237/9840/dedust00088qv.jpg[/img]
and i want to add to things to this plugin :
the first one is that when he touches the ground his vector angels are set to normal .
and the seccond thing is that when he walks on the wall and presses the button again you jump off the wall.. like a little jump ^_^
here is what i have done till now
Code:
/*
WOW my first plugin ^_^
i hope someone likes it
cvars:
amx_walk_active 1
amx_walk_wspeed 250.0 //how fast you are on teh wall
bind +wallwalk to use it ^_^
*/
#include <amxmodx>
#include <fun>
#include <Vexd_Utilities>
new bool:g_canWalk[32]
public plugin_init() {
// Plugin Info
register_plugin("amx_wall_walk","1.0","Om3gA")
register_cvar("amx_walk_active", "1" )
register_cvar("amx_walk_wspeed", "250.0")
register_clcmd("+wallwalk", "amx_walk_kd")
register_clcmd("-wallwalk", "amx_walk_ku")
register_event("ResetHUD","newRound","b")
}
public amx_walk_kd(id)
{
if ( !is_user_alive(id) || !get_cvar_num("amx_walk_active"))
return PLUGIN_HANDLED
wall_walk(id)
return PLUGIN_HANDLED
}
public amx_walk_ku(id)
{
if ( !is_user_alive(id) || g_canWalk[id] )
return PLUGIN_HANDLED
stop_walk(id)
return PLUGIN_HANDLED
}
public wall_walk(id) {
if ( is_user_alive(id) && g_canWalk[id]) {
new Float:velocity[3]
Entvars_Get_Vector(id, EV_VEC_velocity, velocity)
if ( (Entvars_Get_Int(id,EV_INT_button)&IN_FORWARD) ) {
velocity[0]=get_cvar_float("amx_walk_wspeed")
velocity[2]=80.0
Entvars_Set_Vector(id, EV_VEC_velocity, velocity)
//THX To Kleenex
new Float:angles[3]
entity_get_vector(id, EV_VEC_angles, angles)
angles[2] += 90.0 // Change this to the rotation you want
entity_set_vector(id, EV_VEC_angles, angles)
entity_set_int(id, EV_INT_fixangle,1)
}
}
}
public stop_walk(id){
if ( is_user_alive(id) && !g_canWalk[id]) {
//THX To Kleenex
new Float:angles[3]
entity_get_vector(id, EV_VEC_angles, angles)
angles[2] = 0.0 // Change this to the rotation you want
entity_set_vector(id, EV_VEC_angles, angles)
entity_set_int(id, EV_INT_fixangle,1)
}
}
public client_disconnect(id) {
remove_task(id)
}
public newSpawn(id) {
g_canWalk[id]=false
}
and sry for such a long post but i wanted to make everything detailed so everyone underestands it and i hope someone underetands/helps me thx for your time ^_^
__________________