Page 1 of 1
say komandos
Posted: 2012 Jan 20 20:26
by huseiiL
Gal galit sukurti kas nors plugina, kad parasai i cha pvz .live ir vykdo ta komanda.
Komandos
.live
.knife
.warmup
.kick
.pass lol
.nopass
.ff0
.ff1
Re: say komandos
Posted: 2012 Jan 21 12:34
by Fly3r
Pavizdys
Code: Select all
#include <amxmodx> public plugin_init(){ register_plugin("Pluginas", "Versija", "Autorius") register_clcmd("say .live", "Parasyta_komanda")}public Parasyta_komanda(id){ // Vykdoma}
Re: say komandos
Posted: 2012 Jan 21 13:16
by newb
Manau neapsimoka registruot 10 say .komanda, geriau tesiog say ir ten jau ziuret ka parase.
Re: say komandos
Posted: 2012 Jan 21 14:10
by aaarnas
Arba galima net taip išdykauti:
Code: Select all
/* Plugin generated by AMXX-Studio */ #include <amxmodx>#include <amxmisc> #define PLUGIN "New Plug-In"#define VERSION "1.0"#define AUTHOR "aaarnas" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say", "kazka_pasake_O_o")} public kazka_pasake_O_o(id) { new message[250] read_argv(1, message, charsmax(message)) if(message[0] != '.') return PLUGIN_HANDLED; switch(message[1]) { case 'l': { } //.live case 'f': { switch(message[3]) { case '0': { } // .ff0 case '1': { } // .ff1 } } } return PLUGIN_HANDLED;}
Re: say komandos
Posted: 2012 Jan 21 15:06
by psychical
Arnai, turiu klausimą, darant pagal tavąjį būda, nebus taip, jog ką be parašysi, jis tikrinsi ieškodamas to, ko jam reikia?
Re: say komandos
Posted: 2012 Jan 21 15:13
by aaarnas
Taip, tikrins. Dėl to reikia patikrinti ar message[0] == '.' (pamiršau pridėti).