AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved motd qs (https://forums.alliedmods.net/showthread.php?t=333814)

lexzor 08-07-2021 09:43

motd qs
 
Heyo. It is possible to display and use an external site? I want to make a roulette site where player have to log in and play and i want to display it using motd.

PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_clcmd("show_motd2""show_motd2");
}

public 
show_motd2(id)
{
    new 
motd[256];
    
formatex(motdsizeof(motd) - 1,\
    
"<html><head><meta http-equiv=^"Refresh^" content=^"0;url=www.softserver.ro/ruleta/index.html^"></head><body><p><center>LOADING...</center></p></body></html>");
    
show_motd(idmotd);


On this code the motd is opening but i get -6 error.

Shadows Adi 08-07-2021 14:05

Re: motd qs
 
You should specify http:// protocol instead www:

PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_clcmd("show_motd2""show_motd2");
}

public 
show_motd2(id)
{
    new 
motd[256];
    
formatex(motdsizeof(motd) - 1,\
    
"<html><head><meta http-equiv=^"Refresh^"  content=^"0URL=https://softserver.ro/ruleta/index.html^"></head><body><p><center>LOADING...</center></p></body></html>");
    
show_motd(idmotd);


See this ScreenShot

fysiks 08-07-2021 16:22

Re: motd qs
 
You can simply use just the URL: show_motd(id, "http://www.softserver.ro/ruleta/index.html")

amirwolf 08-07-2021 17:09

Re: motd qs
 
Is show motd the only way to open a site?
You mean there is no other way?

Shadows Adi 08-07-2021 17:25

Re: motd qs
 
Quote:

Originally Posted by amirwolf (Post 2754730)
Is show motd the only way to open a site?
You mean there is no other way?

Through motd, no, there is no other way

Natsheh 08-07-2021 20:01

Re: motd qs
 
Quote:

Originally Posted by amirwolf (Post 2754730)
Is show motd the only way to open a site?
You mean there is no other way?


No there is, you can use the browser :) :twisted:

amirwolf 08-08-2021 01:47

Re: motd qs
 
Quote:

Originally Posted by Natsheh (Post 2754737)
No there is, you can use the browser :) :twisted:

Yes, it can be used as well:)

lexzor 08-08-2021 19:48

Re: motd qs
 
Thanks!


All times are GMT -4. The time now is 02:36.

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