AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved][CS1.6] How to make player Spin (https://forums.alliedmods.net/showthread.php?t=187955)

yokomo 06-20-2012 08:59

[Solved][CS1.6] How to make player Spin
 
Hi, how to make player spin on the air just like in amx_fuckoff. I don't have the amx_fuckoff sma.

claudiuhks 06-20-2012 09:10

Re: [CS1.6] How to make player Spin
 
Copy-paste is possible. I really don't recomment using this code listed below. It's your choice. It's not safe. And redundant though.

Code:
// Still quirky, needs fixing. Does work though. Need to perfect the gravity i think. // absolutely needs to be tested fully. public spinner_effect(id) {     new target = id     // <<<<<<< SLOWHACK LOOOOL DON'T SEND CLIENT_CMD >>>>>>>>>     if(entity_get_int(target, EV_INT_flags) & FL_ONGROUND)     {         new Float:Velocity[3]         entity_get_vector(target, EV_VEC_velocity, Velocity)                 Velocity[0] = random_float(200.0, 500.0)         Velocity[1] = random_float(200.0, 500.0)         Velocity[2] = random_float(200.0, 500.0)                 entity_set_vector(target, EV_VEC_velocity, Velocity)     }     entity_set_float(target, EV_FL_friction, 0.1)     entity_set_float(target, EV_FL_gravity, 0.000001) } // Sometimes client_Prethink doesnt work, I dont fucking know why. Not my coding problem. public client_PreThink(id) {     if(spinon[id])     {         spinner_effect(id)     } } public reset_round(id) {     if (spinon[id])     {         entity_set_float(id, EV_FL_friction, 0.1)         new parm[1]         parm[0] = id         set_task(1.0,"spinner_round",id,parm)     }     return PLUGIN_CONTINUE } public spinner_round(parm[]) {     new id = parm[0]     spinner_effect(id) }

yokomo 06-20-2012 11:18

Re: [CS1.6] How to make player Spin
 
Tested your code, doesn't have spin at all, it just blow me up and bounching lol.

hornet 06-20-2012 11:25

Re: [CS1.6] How to make player Spin
 
You want to change EV_VEC_angles to make a player spin. Make sure you set EV_INT_fixangle 1 after changing them.

claudiuhks 06-20-2012 13:02

Re: [CS1.6] How to make player Spin
 
Quote:

Originally Posted by yokomo (Post 1732438)
Tested your code, doesn't have spin at all, it just blow me up and bounching lol.

It's not my code, it's just copy-paste from the original plugin you requested.
I didn't post any link of it because I don't think it's a good plugin to show.

ConnorMcLeod 06-20-2012 13:44

Re: [CS1.6] How to make player Spin
 
Try this
PHP Code:

#define SPIN_SPEED    12.0

#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"
#define PLUGIN "SpinHack"

#define MAX_PLAYERS 32

new g_bSpinHackMAX_PLAYERS 1 char ]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_clcmd("say /spinme""ClCmd_Spin")
    
register_forward(FM_PlayerPreThink"OnPlayerPreThink")
}

public 
client_putinserverid )
{
    
g_bSpinHack{id} = false
}

public 
OnPlayerPreThinkid )
{
    if( 
g_bSpinHack{id} && is_user_alive(id) )
    {
        static const 
Float:VEC_NULL[3] = {0.0,0.0,0.0}
        static 
Float:v_angle[3]; pev(idpev_v_anglev_angle)
        if( ( 
v_angle[1] += SPIN_SPEED ) > 180.0 )
        {
            
v_angle[1] -= 360.0
        
}
        
set_pev(idpev_v_angleVEC_NULL)
        
set_pev(idpev_anglesv_angle)
        
set_pev(idpev_fixangle1)
    }
}

public 
ClCmd_Spinid )
{
    
g_bSpinHack{id} = !g_bSpinHack{id}



Liverwiz 06-20-2012 14:45

Re: [CS1.6] How to make player Spin
 
<snip>

but that's slow hacking......

Exolent[jNr] 06-20-2012 14:47

Re: [CS1.6] How to make player Spin
 
Quote:

Originally Posted by Liverwiz (Post 1732640)
<snip>

but that's slow hacking......

Then don't post it.

yokomo 06-20-2012 15:38

Re: [CS1.6] How to make player Spin
 
Haha damn funny. Tested and Connor's code works fine for me. Thanks man.


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

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