View Single Post
Author Message
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 04-15-2019 , 08:18   Small function crashing server without error logs
Reply With Quote #1

PHP Code:
new sv_password
public plugin_init(){
  
sv_password get_cvar_pointer"sv_password" );
  
register_concmd("amx_pass""passfunc"ADMIN_KICK"duhh")
}


public 
passfunc(id){
    new 
pass random_num(0,10000)
    new 
currpass32 ];
    
get_pcvar_stringsv_password currpass charsmaxcurrpass ) );
    if(
get_pcvar_num(currpass] == EOS )){
        
set_cvar_num("sv_password"pass);
    }
    if(
get_pcvar_num(currpass] != EOS )){
        
set_cvar_string("sv_password","");
    }

basically, this stuff's crashing my server without any error log
__________________

Last edited by deprale; 04-15-2019 at 13:04.
deprale is offline