Reikia pagalbos del plugino.

Forumas skirtas spręsti problemas iškilusias su CS 1.6 serveriais.
Post Reply
gofris88
Naujokas apylinkėse
Posts: 2
Joined: 2011 Sep 07 17:01
Skype: gofris88

Reikia pagalbos del plugino.

Post by gofris88 »

Taigi stai sukuriau plugina. bet neweikia 8 mygtukas (jo funkcija) Stai kodas:




/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"

new bool: gravityday

public plugin_init() {
register_plugin("Meniu", "1.0", "Gofris")
register_menu("Meniu", MENU_KEY_1|MENU_KEY_0|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8 , "meniu_funkcija")
register_clcmd("say /meniu", "rodyti_meniu")
}

public Event_Roundend()
{
if(gravityday)
{
server_cmd("sv_gravity 800")
gravityday = false
}
}

public rodyti_meniu(id) {

new menu_body[300], len


len += formatex(menu_body[len], charsmax(menu_body) - len, "\rDienu meniu:^n^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r1. \wLaisvadienis^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r2. \wGaudynes^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r3. \wAmerikietiskos Gaudynes^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r4. \wSlepynes^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r5. \wGinklu diena^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r6. \wSparta^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r7. \wGreicio Gaudynes^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "\r8. \wGravitacijosGaudynes^n")
len += formatex(menu_body[len], charsmax(menu_body) - len, "^n\r0. \wIseiti")

show_menu(id, MENU_KEY_1|MENU_KEY_0|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8 , menu_body, -1, "Meniu")
}

public meniu_funkcija(id, key) {

if(key == 0) return;

if(key == 1) {}

if(key == 2) {}

if(key == 3) {}

if(key == 4) {}

if(key == 5) {}

if(key == 6) {}

if(key == 7) {}

if(key == 8)

{

server_cmd("sv_gravity 200")

gravityday = true

}

return;
}

arnux
Parašęs kelias žinutes
Posts: 9
Joined: 2010 Oct 21 05:17
Skype: klimax.lt

Re: Reikia pagalbos del plugino.

Post by arnux »

sakyciau... 0 = exit; 9 = next; 8 = back :)

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: Reikia pagalbos del plugino.

Post by psychical »

Pirmiausia, tai menu yra be lang ir be kitu detaliu, todel patartina naudoti nuajausia menu metoda, be to pagal nauja lengviau viskas...

gofris88
Naujokas apylinkėse
Posts: 2
Joined: 2011 Sep 07 17:01
Skype: gofris88

Re: Reikia pagalbos del plugino.

Post by gofris88 »

Is kur man sužinoti naujo meniu pamokas? :)

P.S. Spychai kelk skype :D

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests