This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

please help me, I want assign a permanent hostname using a plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
niko1921
Member
Join Date: Sep 2014
Old 11-06-2014 , 12:54   please help me, I want assign a permanent hostname using a plugin.
Reply With Quote #1

sorry, I'm a beginner
sorry for my English
please help me, I want assign a permanent hostname using a plugin that it can not change with command "hostname" ie blocking the "hostname" command.

this is what I have so far

PHP Code:
#include < amxmodx >
#include < amxmisc >


public plugin_init( ) {
    
register_plugin"set hostname""1.0""niko" );
    
    
register_clcmd"set_hostname""CmdHostName"ADMIN_CFG"<hostname permanent form my server>" );
    
client_cmd(player_id,"set_hostname")
    
client_cmd(player_id,"hostname")
    

/////////please fix my errors :)
    
}

       
PLUGIN_HANDLED;

It really would help me a lot.
thank you.
niko1921 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-06-2014 , 12:58   Re: please help me, I want assign a permanent hostname using a plugin.
Reply With Quote #2

why you need it?
__________________
Jhob94 is offline
niko1921
Member
Join Date: Sep 2014
Old 11-06-2014 , 13:03   Re: please help me, I want assign a permanent hostname using a plugin.
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
why you need it?
I have a company for online games and counter strike her clients wanted to establish a "servername by mycompany" and that he could not change
niko1921 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-06-2014 , 13:20   Re: please help me, I want assign a permanent hostname using a plugin.
Reply With Quote #4

Quote:
Originally Posted by niko1921 View Post
I have a company for online games and counter strike her clients wanted to establish a "servername by mycompany" and that he could not change
When someone rents a server the server is for him. Legaly, you have no right to touch his server without his permission. You cant copy his plugins, nothing, if you havent his permission. Force your costumers to use it on name is ilegal so you can't find support here.
__________________
Jhob94 is offline
Lycode
Junior Member
Join Date: Aug 2014
Old 11-06-2014 , 14:27   Re: please help me, I want assign a permanent hostname using a plugin.
Reply With Quote #5

Requires: Cvar Utilities.
PHP Code:
#include <amxmodx>
#include <cvar_util>
#pragma semicolon 1;

#define Hostname "Server provided by: Niko1921"

public plugin_init()
{
    
register_plugin("Permanent Hostname""0.1""Lycode");
}

public 
CvarHookChanged(handleCvar, const oldValue[], const newValue[], const cvarName[], const defaultValue[])
{
    if(
equal(cvarName"hostname"))
    {
        
set_pcvar_string(handleCvarHostname);
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;

Attached Files
File Type: sma Get Plugin or Get Source (perm_hostname.sma - 613 views - 460 Bytes)
__________________
-This too shall pass
Lycode 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 22:14.


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