AlliedModders

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

Smatify 05-24-2013 09:58

Slowhack?
 
I'm trying to update Kia's Furien but I dont know if this is slowhack:

PHP Code:

public PlayerSpawn(id)  // Wenn Spieler spawnt
{
    if(!
g_bAccepted[id])
    new 
menu menu_create("To play on this server we need to change your settings.^n\rDo you agree?","settings_handler")
    
menu_additem(menu"\yYes","1",0);
    
menu_additem(menu"\rNo (Kick)","2",0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED
}

public 
settings_handler(idmenuitem)
{
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
g_bAccepted[id] = true
            
            
if(is_user_connected(id) && is_user_alive(id)) // Wenn Spieler lebt
            
{
                
fm_strip_user_weapons(id// Usern ALLE Waffen nehmen
        
                
fm_give_item(id"weapon_knife")
        
                if(
cs_get_user_team(id) == CS_TEAM_T// und T ist
                
{
                    
set_task(0.1,"TStuff",id)    
                }
                else if(
cs_get_user_team(id) == CS_TEAM_CT// und CT ist
                
{
                    
set_task(0.1,"CTStuff",id)
                }
            }
        }
        case 
2:
        {
                
KickPlayer(id"You refused to change your settings")
        }
    }
}

public 
TStuff(id)
{
    
set_user_gravity(idget_pcvar_float(cvar_t_grav)) // Gravity auf 375
    
set_user_footsteps(idget_pcvar_num(cvar_t_steps)) // Kein Schrittsounds
    
set_user_maxspeed(idget_pcvar_float(cvar_t_speed)) // Speed auf 700
    
    
give_item(id"weapon_hegrenade"// Nades geben
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_smokegrenade")
    
    
client_cmd(id"sv_maxspeed %i",get_pcvar_num(cvar_t_speed)) // Speedwerte setzen
    
client_cmd(id"cl_forwardspeed %i",get_pcvar_num(cvar_t_speed))
    
client_cmd(id"cl_sidespeed %i",get_pcvar_num(cvar_t_speed))
    
client_cmd(id"cl_backspeed %i",get_pcvar_num(cvar_t_speed))



claudiuhks 05-24-2013 10:37

Re: Slowhack?
 
I don't think it's something bad in there.

bibu 05-24-2013 11:34

Re: Slowhack?
 
It isn't something bad, but this can't be used anymore.

Kia 05-24-2013 11:37

Re: Slowhack?
 
PHP Code:

    client_cmd(id"sv_maxspeed %i",get_pcvar_num(cvar_t_speed)) // Speedwerte setzen 
    
client_cmd(id"cl_forwardspeed %i",get_pcvar_num(cvar_t_speed)) 
    
client_cmd(id"cl_sidespeed %i",get_pcvar_num(cvar_t_speed)) 
    
client_cmd(id"cl_backspeed %i",get_pcvar_num(cvar_t_speed)) 

At my omfg-Furien it's working.

Smatify 05-24-2013 13:49

Re: Slowhack?
 
Quote:

Originally Posted by bibu (Post 1957608)
It isn't something bad, but this can't be used anymore.

It's working, but I didn't know if it is slowhacking

bibu 05-24-2013 14:22

Re: Slowhack?
 
Quote:

Originally Posted by Kia (Post 1957611)
PHP Code:

    client_cmd(id"sv_maxspeed %i",get_pcvar_num(cvar_t_speed)) // Speedwerte setzen 
    
client_cmd(id"cl_forwardspeed %i",get_pcvar_num(cvar_t_speed)) 
    
client_cmd(id"cl_sidespeed %i",get_pcvar_num(cvar_t_speed)) 
    
client_cmd(id"cl_backspeed %i",get_pcvar_num(cvar_t_speed)) 

At my omfg-Furien it's working.

1. sv_* , it's a server cvar, nothing to execute on the client.
2. I don't know, but pretty much stuff have been blocked since the new update.

@ Smatify:

Since you're asking the player, it isn't slowhacking.

Smatify 05-24-2013 14:28

Re: Slowhack?
 
Quote:

Originally Posted by bibu (Post 1957700)
sv_* , it's a server cvar, nothing to execute on the client.

Oh, thank you :D

Quote:

Originally Posted by bibu (Post 1957700)
Since you're asking the player, it isn't slowhacking.

Ah ok

Jhob94 05-24-2013 16:34

Re: Slowhack?
 
Quote:

Originally Posted by bibu (Post 1957700)
Since you're asking the player, it isn't slowhacking.

When i released my sonic mod i thought that too but is wrong.
You are slowhacking.
For dont be slowhack, you should make yes/no. If player dont want, he get kicked, so basickly you are forcing him :arrow: SlowHack Confirmed :3

Kia 05-24-2013 16:52

AW: Slowhack?
 
Then just don't do anything when he presses "No."

Jhob94 05-24-2013 17:01

Re: Slowhack?
 
Well yes.
Or:
If you want, i copied this from my bazooka mod:
PHP Code:

#include <amxmodx>
#include <hamsandwich>

new bool:Allowed_Player[33]
new 
g_iMenuAllow
new Trash
new szKey[7]

public 
plugin_init()
{
    
register_plugin("Bazooka Mod(Speed CMDs Only)""2.0""Jhob94")
    
    
RegisterHam(Ham_Spawn"player""Player_Spawn_Post"1)
    
    
register_clcmd("say /speedcmds""AllowMenu")
    
register_clcmd("say_team /speedcmds""AllowMenu")
}

public 
client_putinserver(id)
{
    
Allowed_Player[id] = false
}

public 
Player_Spawn_Post(id)
{
    if(!
Allowed_Player[id])
        
AllowMenu(id)
}

public 
AllowMenu(id
{
    if(!
Allowed_Player[id])
    {
        
g_iMenuAllow menu_create("\r[ Speed CMDs ]^n \yDo You Accept Server Change Your Speed Commands?\w""HandleAllowMenu")
        
menu_additem(g_iMenuAllow"Yes""1"0
        
menu_additem(g_iMenuAllow"No (Maybe You Wont Run Fast)""2"0)
        
        
menu_setprop(g_iMenuAllowMPROP_EXITMEXIT_ALL)  
        
menu_display(idg_iMenuAllow0)
    }
}

public 
HandleAllowMenu(idiMenuitem

    if(
item == MENU_EXIT
        
reopen_msg(id)
    
    
menu_item_getinfo(iMenuitemTrashszKey1""0Trash
    
    switch(
szKey[0]) 
    { 
        case 
'1'
        { 
            
Allowed_Player[id] = true
            client_cmd
(id"cl_forwardspeed 2000;cl_sidespeed 2000;cl_backspeed 2000")
        } 
        
        case 
'2'
        {
            
reopen_msg(id)
        }
    } 
    return 
PLUGIN_HANDLED
}

public 
reopen_msg(id
{
    if(!
Allowed_Player[id])
        
client_print(idprint_chat"[AMXX] You can reopen speed menu  saying /speedcmds. You should accept for can run faster.")




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

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