AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Need help in Motd i think convert to Formatex (https://forums.alliedmods.net/showthread.php?t=295310)

shehzad1234 03-22-2017 07:03

Need help in Motd i think convert to Formatex
 
Hey Friends :D

i need your help i want i transfer same file in other server then gametracker open hi server ip example 1st time this file on this ip 1.1.10.11.1:111 then show like http://www.gametracker.com/server_info/1.1.10.11.1:111
and i transfer this file in other server same server copy current sv ip i think need Formatex :P


Sorry For My bad English :(

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Test plugin by shehzad"
#define VERSION "1.0"
#define AUTHOR "Muhammad shehzad"

new IP[19

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /test""TestMotd");
    
    
// Add your code here...
}
public 
TestMotd(id)
{
    
get_user_ip(0IPcharsmax(IP)) 
    
show_motd(id"http://www.gametracker.com/server_info/%s""GameTracker"ip)


Errors :-

HTML Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Number of arguments does not match definition on line 21

1 Error.
Could not locate output file C:\Users\shehzad\Desktop\my plugin\Untitled.amx (compile failed).


yas17sin 03-22-2017 07:27

Re: Need help in Motd i think convert to Formatex
 
this ? :
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Test plugin by shehzad"
#define VERSION "1.0"
#define AUTHOR "Muhammad shehzad"

new g_Ip[25];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /test""TestMotd");
    
    
get_user_ip(0g_Ipcharsmax(g_Ip));
    
    
// Add your code here...
}
public 
TestMotd(id)
{
    
show_motd(id"http://www.gametracker.com/server_info/%s"g_Ip)



shehzad1234 03-22-2017 07:34

Re: Need help in Motd i think convert to Formatex
 
Quote:

Originally Posted by yas17sin (Post 2505641)
this ? :
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Test plugin by shehzad"
#define VERSION "1.0"
#define AUTHOR "Muhammad shehzad"

new g_Ip[25];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /test""TestMotd");
    
    
get_user_ip(0g_Ipcharsmax(g_Ip));
    
    
// Add your code here...
}
public 
TestMotd(id)
{
    
show_motd(id"http://www.gametracker.com/server_info/%s"g_Ip)



no bro i need motd title and g_IP :) Motd Titile is GameTracker and g_Ip for Server Ip :)

shehzad1234 03-22-2017 07:35

Re: Need help in Motd i think convert to Formatex
 
like change this show_motd to formatex

yas17sin 03-22-2017 08:17

Re: Need help in Motd i think convert to Formatex
 
here see this and take exapmle : https://forums.alliedmods.net/showpo...71&postcount=1

just search.

shehzad1234 03-22-2017 11:55

Re: Need help in Motd i think convert to Formatex
 
can u add on my code pleasE?

KiLLeR. 03-22-2017 12:10

Re: Need help in Motd i think convert to Formatex
 
PHP Code:

new link[128];
formatex(linkcharsmax(link), "http://www.gametracker.com/server_info/%s"ip);
show_motd(idlink"GameTracker"


shehzad1234 03-22-2017 14:22

Re: Need help in Motd i think convert to Formatex
 
Quote:

Originally Posted by KiLLeR. (Post 2505740)
PHP Code:

new link[128];
formatex(linkcharsmax(link), "http://www.gametracker.com/server_info/%s"ip);
show_motd(idlink"GameTracker"


thanks! bro its 100% working :D

PRoSToTeM@ 03-22-2017 17:47

Re: Need help in Motd i think convert to Formatex
 
PHP Code:

show_motd(idfmt("http://www.gametracker.com/server_info/%s"ip), "GameTracker"


shehzad1234 03-23-2017 05:42

Re: Need help in Motd i think convert to Formatex
 
Quote:

Originally Posted by PRoSToTeM@ (Post 2505837)
PHP Code:

show_motd(idfmt("http://www.gametracker.com/server_info/%s"ip), "GameTracker"


lol bro your code have error

Code:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// gt_test.sma
// D:\Steam\steamapps\common\Half-Life\cstrike\addons\amxmodx\scripting\gt_test.
sma(22) : error 017: undefined symbol "fmt"
//
// 1 Error.
// Could not locate output file D:\Steam\steamapps\common\Half-Life\cstrike\addo
ns\amxmodx\scripting\compiled\gt_test.amx (compile failed).
//
// Compilation Time: 0.94 sec
// ----------------------------------------

Press enter to exit ...



All times are GMT -4. The time now is 17:54.

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