Raised This Month: $51 Target: $400
 12% 

[HELP] Location change by cvar Motd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 08-25-2018 , 12:52   [HELP] Location change by cvar Motd
Reply With Quote #1

Hey Friends

need help like i have 2 online uploaded html files i want i can change that url's by cvar like :-
default cvar :-
amx_html_rules_url "http://yourwebsite.com/youfolder/yourfile1.html"

and i want to change url by cvar like
amx_html_rules_url "http://yourwebsite.com/youfolder/yourfile2.html"
like this.

default code

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

public plugin_init() 

    
register_plugin("Yest""1.3""Test"
    
register_clcmd("say /rules""msmotd")  
    
register_clcmd("say_team /rules""msmotd")
    
register_clcmd("say /rule""msmotd")  
    
register_clcmd("say_team /rule""msmotd")
    
set_task(40.0"adv")

    
//Since you wanted console too...
    
register_clcmd("amx_hns_rulles""msmotd")  

public 
msmotd(id)

{
    
show_motd(id"http://yourwebsite.com/youfolder/yourfile1.html");
}

public 
adv(id)

{
    
ColorChat(0GREY"^4-^1=^3}^4MultiMod^3{^1=^4- ^3Type ^4/rules^3 and^4 rules ^3And Read ^4Hide N Seek ^1Rules");
    
set_task(200.0"adv")

Thanks in advance help please.
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 08-26-2018 , 07:54   Re: [HELP] Location change by cvar Motd
Reply With Quote #2

anyone ?
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Mr Misw
Member
Join Date: Aug 2018
Location: India
Old 08-26-2018 , 08:11   Re: [HELP] Location change by cvar Motd
Reply With Quote #3

Quote:
#include <amxmodx>
#include <amxmisc>
#include <ColorChat>

new g_showlink;
public plugin_init()
{
register_plugin("Yest", "1.3", "Test")
register_clcmd("say /rules", "msmotd")
register_clcmd("say_team /rules", "msmotd")
register_clcmd("say /rule", "msmotd")
register_clcmd("say_team /rule", "msmotd")
set_task(40.0, "adv")
g_showlink = register_cvar("show_link", "1")
register_clcmd("amx_hns_rulles", "msmotd")

}
public msmotd(id)
{
if(get_pcvar_num(g_showlink))
{
show_motd(id, "http://yourwebsite.com/youfolder/yourfile1.html");
}
else
{
show_motd(id, "http://yourwebsite.com/youfolder/yourfile2.html");
}
}
public adv(id)

{
ColorChat(0, GREY, "^4-^1=^3}^4MultiMod^3{^1=^4- ^3Type ^4/rules^3 and^4 rules ^3And Read ^4Hide N Seek ^1Rules");
set_task(200.0, "adv")
}
__________________
Facebook ==> Here
ScrewedUP's Website :
Main Website
My Ranking System [Skin Version] :
ScrewedUP Ranking System
My Ranking System [Without Skin Version] :
ScrewedUP Ranking System
Mr Misw is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-26-2018 , 09:08   Re: [HELP] Location change by cvar Motd
Reply With Quote #4

@Mr Misw don't kill plugins' indentation.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 08-26-2018 , 10:47   Re: [HELP] Location change by cvar Motd
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
@Mr Misw don't kill plugins' indentation.
do you have any idea bro?
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-26-2018 , 12:59   Re: [HELP] Location change by cvar Motd
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?t=297627
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 08-26-2018, 16:03
shehzad1234
This message has been deleted by shehzad1234.
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 08-26-2018 , 16:04   Re: [HELP] Location change by cvar Motd
Reply With Quote #7

never mind this one is working thanks Mr Misw
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 08-26-2018 , 16:07   Re: [HELP] Location change by cvar Motd
Reply With Quote #8

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

new cvar_RulesUrl;

public 
plugin_init()  
{  
    
register_plugin("Yest""1.3""Test")  
    
register_clcmd("say /rules""msmotd")   
    
register_clcmd("say_team /rules""msmotd"
    
register_clcmd("say /rule""msmotd")   
    
register_clcmd("say_team /rule""msmotd"
    
set_task(40.0"adv"
    
cvar_RulesUrl register_cvar("amx_html_rules_url""http://yourwebsite.com/youfolder/yourfile1.html");

    
//Since you wanted console too... 
    
register_clcmd("amx_hns_rulles""msmotd")   
}  
public 
msmotd(id

    new 
szPath[256];
    
get_pcvar_string(cvar_RulesUrlszPathsizeof(szPath));
    
show_motd(idszPath); 


public 
adv(id

    
ColorChat(0GREY"^4-^1=^3}^4MultiMod^3{^1=^4- ^3Type ^4/rules^3 and^4 rules ^3And Read ^4Hide N Seek ^1Rules"); 
    
set_task(200.0"adv"

__________________
Airkish is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-26-2018 , 16:45   Re: [HELP] Location change by cvar Motd
Reply With Quote #9

And what's the point of the cvar? It's not like you're going to change the rules every 5 minutes while playing.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shauli
Member
Join Date: Jun 2018
Old 08-26-2018 , 17:16   Re: [HELP] Location change by cvar Motd
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post
And what's the point of the cvar? It's not like you're going to change the rules every 5 minutes while playing.
Even if he wants to change the rules once per month, it's still easier than recompiling the source code.
shauli 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 13:04.


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