Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <fakemeta>
- #include <fakemeta_util>
- #include <hamsandwich>
- new const PLUGIN[] = "Furien WallHang";
- new const VERSION[] = "1.0";
- #pragma semicolon 1
- // Float
- new Float: Wallorigin[33][3];
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, "Aragon*");
- // Ham Forwrads
- RegisterHam(Ham_Touch, "player", "fw_PlayerTouch", 1);
- // FM Forwards
- register_forward(FM_PlayerPostThink, "fw_PlayerPostThink");
- // CVARs
- register_cvar("furien_wallahng", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
- }
- public fw_PlayerTouch(id, world)
- {
- if(is_user_alive(id) && get_user_team(id) == 1)
- {
- new ClassName[32];
- pev(world, pev_classname, ClassName,(32-1));
- if(equal(ClassName, "worldspawn") || equal(ClassName, "func_wall") || equal(ClassName, "func_breakable"))
- pev(id, pev_origin, Wallorigin[id]);
- }
- return HAM_SUPERCEDE;
- }
- public fw_PlayerPostThink(id)
- {
- if(is_user_alive(id) && get_user_team(id) == 1)
- {
- static Float:Origin[3];
- pev(id, pev_origin, Origin);
- static Button;
- Button = pev(id, pev_button);
- if(Button & IN_USE && get_distance_f(Origin, Wallorigin[id]) <= 5.0 && !(pev(id, pev_flags) & FL_ONGROUND))
- {
- new Float:Velocity[3];
- new ClimbSpeed = floatround(pev(id, pev_maxspeed) / 2.0);
- if(Button & IN_FORWARD)
- {
- velocity_by_aim(id, ClimbSpeed, Velocity);
- fm_set_user_velocity(id, Velocity);
- }
- else if(Button & IN_BACK)
- {
- velocity_by_aim(id, - ClimbSpeed, Velocity);
- fm_set_user_velocity(id, Velocity);
- }
- else
- {
- set_pev(id, pev_origin, Wallorigin[id]);
- velocity_by_aim(id, 0, Velocity);
- fm_set_user_velocity(id, Velocity);
- }
- }
- }
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement