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 ^_^
and here is what i have like now:
Code:
// Trinity!
/* CVARS - copy and paste to shconfig.cfg
//credit to the author off scarlet spider he was like my base ^_^
//Trinity
Trinity_level 6
Trinity_wspeed 250.0 //speed she Walks on The walls
*/
#include <amxmodx>
#include <Vexd_Utilities>
#include <shero>
#if !defined AMX_NEW
#include <xtrafun> //Only for the constants, doesn't use any functions
#endif
new g_heroName[]="Trinity"
new g_heroID
new bool:g_hasTrinityPower[SH_MAXSLOTS+1]
new bool:g_canWalk[SH_MAXSLOTS+1]
public plugin_init() {
// Plugin Info
register_plugin("SUPERHERO Trinity","1.0","Om3gA")
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
register_cvar("Trinity_level", "0")
register_cvar("Trinity_wspeed", "250.0")
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
g_heroID = sh_create_hero(g_heroName)
sh_hero_info(g_heroID, "Walk On Walls", "Press the bound key and jump/run into a wall to Run on it!")
sh_hero_bind(g_heroID, true)
sh_hero_level(g_heroID, get_cvar_num("Trinity_level"))
}
public sh_hero_init(id, heroID, mode)
{
if ( g_heroID == heroID )
{
g_hasTrinityPower[id] = (mode != 0)
}
}
public wall_walk(id) {
if ( is_user_alive(id) && g_hasTrinityPower[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("trinity_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)
}
}
}
// RESPOND TO KEYDOWN
public sh_hero_key(id, heroID, key)
{
if ( g_heroID != heroID ) return PLUGIN_HANDLED
if ( key == SH_KEYDOWN )
{
if ( !g_canWalk[id] ) {
g_canWalk[id]=true
set_task(0.1,"wall_walk",id,"",0,"b")
set_hudmessage(20, 255, 20, -1.0, 0.25, 0, 1.0, 1.2, 0.4, 0.4, 95)
show_hudmessage(id, "You can now walk On walls!")
return PLUGIN_HANDLED
}
if ( !g_canWalk[id] )
g_canWalk[id]=false
set_task(0.1,"no_walk",id,"",0,"b")
remove_task(id)
set_hudmessage(20, 255, 20, -1.0, 0.25, 0, 1.0, 1.2, 0.4, 0.4, 95)
show_hudmessage(id, "You canĀ“t walk on walls anymore.")
}
return PLUGIN_HANDLED
}
public no_walk(id){
if ( is_user_alive(id) && g_hasTrinityPower[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 sh_new_spawn(id) {
g_canWalk[id]=false
}
and yes i know there is allready one trinity hero but this is better coz this aint just morpheus with changet name and mdl O.o
__________________