AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Noclip Edit (https://forums.alliedmods.net/showthread.php?t=346570)

tedaimlocks 03-04-2024 14:09

Noclip Edit
 
May anyone edit this noclip code to increase the speed of it? I dont want it to have the same speed as sv_maxspeed, i want to be able to move with noclip when sv_maxspeed is 0

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
    
register_plugin("amx_cheat","1.0","watch")
    
register_concmd("amx_godmode","amx_godmode",ADMIN_RCON,"<target>")
    
register_concmd("amx_noclip","amx_noclip",ADMIN_RCON,"<target>")
}

public 
amx_godmode(id,level,cid) {
    if (!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED
    
    
new arg[32], admin_name[32], target_name[32]
    
read_argv(1,arg,31)

    new 
player cmd_target(id,arg,14)
    if (!
player) return PLUGIN_HANDLED

    get_user_name
(id,admin_name,31)
    
get_user_name(player,target_name,31)

    if (!
get_user_godmode(player)) {
        
set_user_godmode(player,1)
        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: enabled godmode on %s",admin_name,target_name)
            case 
1:    client_print(0,print_chat,"ADMIN: enabled godmode on %s",target_name)
        }
    } else {
        
set_user_godmode(player)
        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: disabled godmode on %s",admin_name,target_name)
            case 
1:    client_print(0,print_chat,"ADMIN: disabled godmode on %s",target_name)
        }
    }
    return 
PLUGIN_HANDLED
}

public 
amx_noclip(id,level,cid) {
    if (!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED
    
    
new arg[32], admin_name[32], target_name[32]
    
read_argv(1,arg,31)

    new 
player cmd_target(id,arg,14)
    if (!
player) return PLUGIN_HANDLED

    get_user_name
(id,admin_name,31)
    
get_user_name(player,target_name,31)

    if (!
get_user_noclip(player)) {
        
set_user_noclip(player,1)
        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: enabled noclip on %s",admin_name,target_name)
            case 
1:    client_print(0,print_chat,"ADMIN: enabled noclip on %s",target_name)
        }
    } else {
        
set_user_noclip(player)
        switch(
get_cvar_num("amx_show_activity")) {
            case 
2:    client_print(0,print_chat,"ADMIN %s: disabled noclip on %s",admin_name,target_name)
            case 
1:    client_print(0,print_chat,"ADMIN: disabled noclip on %s",target_name)
        }
    }
    return 
PLUGIN_HANDLED



tedaimlocks 03-06-2024 02:14

Re: Noclip Edit
 
Or if its not possible to add speed to it, maybe a fly command or something i can use to move when sv_maxspeed is 0

georgik57 03-07-2024 11:48

Re: Noclip Edit
 
Try setting sv_spectatormaxspeed to a higher value. Make sure sv_maxvelocity is also higher or equal to the latter.

tedaimlocks 03-07-2024 12:31

Re: Noclip Edit
 
Quote:

Originally Posted by georgik57 (Post 2819121)
Try setting sv_spectatormaxspeed to a higher value. Make sure sv_maxvelocity is also higher or equal to the latter.

sv_spectatormaxspeed is 500
sv_maxvelocity is 2000

They dont work, even changed values for both

georgik57 03-07-2024 12:47

Re: Noclip Edit
 
need to change map after you set them higher as far as i remember

tedaimlocks 03-07-2024 13:18

Re: Noclip Edit
 
Quote:

Originally Posted by georgik57 (Post 2819125)
need to change map after you set them higher as far as i remember

Not workin

georgik57 03-07-2024 15:36

Re: Noclip Edit
 
PHP Code:

    else if (equali(szArg1"/noclip"))
    {
        if (
pev(iIDpev_movetype) != MOVETYPE_NOCLIP)
        {
            
set_pev(iIDpev_movetypeMOVETYPE_NOCLIP)
            
set_pev(iIDpev_maxspeed2000.0)
        }
        else
            
set_pev(iIDpev_movetypeMOVETYPE_WALK)
    } 

maxspeed will change every time you switch weapons as far as i remember(at least in cs) so keep that in mind

tedaimlocks 03-08-2024 01:50

Re: Noclip Edit
 
Quote:

Originally Posted by georgik57 (Post 2819131)
PHP Code:

    else if (equali(szArg1"/noclip"))
    {
        if (
pev(iIDpev_movetype) != MOVETYPE_NOCLIP)
        {
            
set_pev(iIDpev_movetypeMOVETYPE_NOCLIP)
            
set_pev(iIDpev_maxspeed2000.0)
        }
        else
            
set_pev(iIDpev_movetypeMOVETYPE_WALK)
    } 

maxspeed will change every time you switch weapons as far as i remember(at least in cs) so keep that in mind

No, it doesnt , it changes instantly when used command , and where do i put that code cuz i can't code

georgik57 03-10-2024 12:31

Re: Noclip Edit
 
set_pev(iID, pev_maxspeed, 2000.0) under set_user_noclip(player,1). Make sure to set it back to default when turning noclip off and also to #include <fakemeta>.

tedaimlocks 03-10-2024 13:06

Re: Noclip Edit
 
can u do the whole code? i dont know how to do it


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

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