Raised This Month: $ Target: $400
 0% 

Slowhack?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-24-2013 , 17:01   Re: Slowhack?
Reply With Quote #1

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.")

__________________
Jhob94 is offline
Smatify
Senior Member
Join Date: Nov 2012
Location: Where ever you want
Old 05-24-2013 , 17:32   Re: Slowhack?
Reply With Quote #2

Quote:
Originally Posted by Jhob94 View Post
Well yes.
Or:
If you want, i copied this from my bazooka mod:
I dont want to use slowhack, so i will take your idea, or Kia's
__________________
Selling Hosting stuff such as Webspace and Game- & VoiceServer

I'm also selling Steam Keys.
For more informations, contact me.

(Homepage is under development)
Smatify is offline
Smatify
Senior Member
Join Date: Nov 2012
Location: Where ever you want
Old 05-24-2013 , 18:59   Re: Slowhack?
Reply With Quote #3

So this is ok?

PHP Code:
public settings_menu(id)  // Wenn Spieler spawnt
{
    if(
g_bAccepted[id])
        return 
PLUGIN_HANDLED
    
    
new menu menu_create("\wTo play on this server we need to change your settings.^n\yDo you agree?","settings_handler")
    
menu_additem(menu"\wYes","1",0);
    
menu_additem(menu"\rNo (You will not run fast)","2",0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED
}

public 
settings_handler(idmenuitem)
{
    if(
item == MENU_EXIT
        
settings_declined(id)
    
    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:
        {
            
settings_declined(id)
        }
    }
}

public 
settings_declined(id)
{
    if(!
g_bAccepted[id])
    {
        
set_hudmessage(255255255, -0.50.506.012.00.1)
        
show_hudmessage(id"You declined to change your settings. ^nThe menu will be open again at your next spawn")
    }
}

public 
TStuff(id)
{
    
server_cmd("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))
}

public 
CTStuff(id)
{
    
client_cmd(id"cl_minmodels 0"// Models setzen
    
cs_set_user_model(id"antifurien")

__________________
Selling Hosting stuff such as Webspace and Game- & VoiceServer

I'm also selling Steam Keys.
For more informations, contact me.

(Homepage is under development)
Smatify is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-24-2013 , 19:18   Re: Slowhack?
Reply With Quote #4

Quote:
Originally Posted by Smatify View Post
server_cmd("sv_maxspeed %i",get_pcvar_num(cvar_t_speed)) // Speedwerte setzen
Remove that, it is a server cvar not client cvar
And the way you set model isnt good.
If i go in console and do: model "gign" i will have gign model
__________________
Jhob94 is offline
Smatify
Senior Member
Join Date: Nov 2012
Location: Where ever you want
Old 05-24-2013 , 20:33   Re: Slowhack?
Reply With Quote #5

I think in the code is a mistake, isn't it?

Because when you spawn again the menu won't be open. Therefore the weapons won't be stript and not were settings between the teamchange.

Or am I wrong again?
__________________
Selling Hosting stuff such as Webspace and Game- & VoiceServer

I'm also selling Steam Keys.
For more informations, contact me.

(Homepage is under development)

Last edited by Smatify; 05-24-2013 at 20:33.
Smatify is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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