AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help :D (https://forums.alliedmods.net/showthread.php?t=17640)

Om3gA 09-05-2005 14:04

help :D
 
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 ^_^

Om3gA 09-05-2005 15:21

Re: help :D
 
well on found out that i can set teh players vector angels to normal when he hits teh ground or i gues this wud make it

Code:

new flags = Entvars_Get_Int(id, EV_INT_flags)
 if (!flags&(1<<9))
 {         
        //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)
 
 }


[OFFTOPIC]well why does i have -7 karma i never posted anything b4 i just like give karma to ppl -_- [/OFFTOPIC]

XunTric 09-05-2005 17:14

Re: help :D
 
Quote:

Originally Posted by Om3gA
well why does i have -7 karma i never posted anything b4 i just like give karma to ppl -_-

You loose karma when giving to others...

Om3gA 09-05-2005 17:41

Re: help :D
 
LOl thats gay but w/e now back to teh topic ^_^

v3x 09-05-2005 23:44

Code:
 #include <amxmod>  #include <fun>  #include <Vexd_Utilities>
This is AMX, not AMXX. :P

Also, I believe you already posted over there ;)

Om3gA 09-06-2005 01:21

now it is amxx so help me plzz..

Om3gA 09-06-2005 12:46

anyone..............


All times are GMT -4. The time now is 14:19.

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