AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [ZP] No Survivor Recoil (https://forums.alliedmods.net/showthread.php?t=97547)

Mog12345 07-17-2009 02:31

[ZP] No Survivor Recoil
 
1 Attachment(s)
No Survivor Recoil:

Simple - The survivor has no recoil!

Cvars - none

Enjoy!

NiHiLaNTh 07-17-2009 02:37

Re: Give no recoil to Survivor, sry about other thread
 
Code:

new g_punchAngle[3] = { 0.0, 0.0, 0.0 }
Somewhere at the code...
Code:

set_pev(id, pev_punchangle, g_punchAngle)

Mog12345 07-17-2009 02:38

Re: Give no recoil to Survivor, sry about other thread
 
So what do you suggest I do?

NiHiLaNTh 07-17-2009 02:47

Re: Give no recoil to Survivor, sry about other thread
 
Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

new g_punchAngle[3] = { 0.0, 0.0, 0.0 }

public plugin_init()
{
        register_plugin("LOL", "OMFG", "LMAO")

        register_forward(FM_PlayerPreThink, "fwd_player_think")
}

public fwd_player_think(id)
{
        if (is_user_alive(id))
        {
                if (zp_get_user_survivor(id))
                {
                        set_pev(id, pev_punchangle, g_punchAngle)
                }
        }
}


Mog12345 07-17-2009 03:09

Re: Give no recoil to Survivor, sry about other thread
 
Okay, I tried putting that into the code in the best places possible, but when I compile, i get:

Error: Undefined symbol: zp_get_user_survivor

Fry! 07-17-2009 03:18

Re: Give no recoil to Survivor, sry about other thread
 
Do you have the newest zombieplague.inc in your scripting/include folder? Cuz looks like you don't have it.

Mog12345 07-17-2009 03:30

Re: Give no recoil to Survivor, sry about other thread
 
Actually, I tried Nihilanth's code and it works, however, the screen sometimes jerks up when shooting. The code that's in the agent zero i provided makes it so the screen does not jerk up and down. I know I'm a really bad coder and I've absolutely morphed the code..

meTaLiCroSS 07-18-2009 03:08

Re: Give no recoil to Survivor, sry about other thread
 
Quote:

Originally Posted by Mog12345 (Post 875302)
I fixed it! It works flawlessly now, with no screen jerking up and down.

Yes, yes, it compiles with 5 warnings that I really don't know how to fix, but trust me, it works perfectly in-game.

:/

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <engine>

new Float:gPunchAngle[3] = { 0.00.00.0 }
new 
g_maxplayers

public plugin_init()
{
    
register_plugin("No Survivor Recoil""v1.0""ZP")
    
g_maxplayers get_maxplayers()
}

public 
server_frame()
{
    for ( new 
id 1id <= g_maxplayersid++ )         
    {
        if ( 
is_user_alive(id) && zp_get_user_survivor(id) )
            
set_pev(idpev_punchanglegPunchAngle);
    }



Mog12345 07-18-2009 04:25

Re: Give no recoil to Survivor, sry about other thread
 
Plugin updated in first post

XeOn Cp 03-09-2015 05:24

Re: [ZP] No Survivor Recoil
 
Runtime Error


All times are GMT -4. The time now is 17:00.

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