←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

[Szukam] /coś

Locked

  • +
  • -
Drzanas's Photo Drzanas 16.02.2011

Witam.
Za bardzo nie wiedziałem jak nazwać temat, ale szukam pluginu który po wpisaniu np /serwer pokazuje w hud informajce o serwerze np IP adres forum i inne. Ten przykład może was zmylić z innym pluginem więc podam inny przykład.
Gracz pisze /forum i wyświetla mu się adres forum. Nie chodzi mi o okienko motd.
Z góry dziękuje
Quote

  • +
  • -
Gufinsky's Photo Gufinsky 16.02.2011

/* Plugin generated by AMXX-Studio */



#include <amxmodx>

#include <amxmisc>



#define PLUGIN "Forum"

#define VERSION "1.0"

#define AUTHOR "amxx.pl"





public plugin_init() {

	register_plugin(PLUGIN, VERSION, AUTHOR)

	register_clcmd("say /forum","forum")

	

}

public forum(id)

{

	

ColorChat(id, YELLOW = 1, "***^x04 Zapraszamy na nasze forum:^x03 www.xxx.pl^x01 *** ");

}
Quote

  • +
  • -
Drzanas's Photo Drzanas 19.02.2011

A czy da radę żeby nie otwierało się motd tylko na say byłaby treść pliku?
Quote

  • +
  • -
Gufinsky's Photo Gufinsky 19.02.2011

Czytanie z pliku?

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Forum"
#define VERSION "1.0"
#define AUTHOR "Suis%gufinsky"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /forum","forum")
    
}
public forum(id)
{
    
    if (file_exists("addons/amxmodx/configs/forum.txt"))  {
        
        new line=0, text[128],chars 
        do{ 
            line = read_file("addons/amxmodx/configs/forum.txt",line,text,127,chars) 
            client_print(0,print_chat,"%s",text)
        } 
        while(line!=0)    
        }
}



w configs robisz forum.txt i wpisujesz, możliwe, że sam się zrobi ten plik ;D
Quote
Locked