Welkom Gast! [Registreer] :: [Login]
Navigatie

Tutorials

Shoutbox
U dient in te loggen om een bericht te plaatsen.

22/05/2012 09:42
Hartelijk dank voor de gif btw! Smile Thumbs

22/05/2012 09:41
@Hurra: Tjah, ik ben nu eenmaal voor Android. Kheb geen zin in discussie Pfft elk heeft z'n eigen smaak en voorkeur

20/05/2012 21:33
Squire, dat is nutteloze software.

20/05/2012 20:51
@ ground zero.. download GIF Movie Gear. http://www.gamani.
com/gmgdown.htm

20/05/2012 20:45
Android is het meest gesloten open source project ter wereld. Alsook, GIF


Volg ons voor statusupdates en aankondigingen!
Registreer of log in
Om gebruik te maken van de volledige functionaliteit van Modbase moet je ingelogd zijn.
Na registratie kan je reageren, onderwerpen starten, projecten toevoegen en nog veel meer.

Dit is volkomen gratis en duurt hoogstens een minuut.

Registreer gratis

Eigen Rcontool/Rconmenu maken - Deel 2



Dit wordt weer een hele lange.

Hallo en welkom bij het 2e deel van een eigen rconmenu maken. Als je een verfrisser nodig hebt of als je deel 1 nog niet hebt bekeken, kan dat hier. In dit deel gaan we wat verder op menus in, ik ga 2 voorbeelden geven namelijk Map menu en Clientcontrol menu. Ook ga ik nog een paar andere voorbeelden geven als een rconpassword menu. En nog iets extras.

Dus, wij hebben nu (uit deel 1):

[Jouw_Folder]->[ui_mp]->[scriptmenus]

[ui_mp]:
-> ingame.txt (hier ga je alle menu's in precachen)
->menudef.txt (niet nodig, wel handig)
->main.menu (om je rconmenu in te openen)

scriptmenus:
Alle team_(..).menu files:
->team_americangerman.menu
->team_britishgerman.menu
->team_german.menu
->team_russiangerman.menu
Alle weapon_(..).menu files:
->weapon_american.menu
->weapon_americangerman.menu
->weapon_british.menu
->weapon_britishgerman.menu
->weapon_german.menu
->weapon_russian.menu
->weapon_russiangerman.menu
EN de 2 nieuwe files:
rcon.menu (naam kan anders zijn; de main van je rcontool)
client.menu (naam kan anders zijn; de clientcontrol van je menu)

Dan gaan we nu maar eens verder met waar we gebleven waren.

Je had dus een main menu met een rcon menu button;
En een rconmenu met clientcontrol button;
En een button waarmee je client 0 kon kicken.

Hier gaan wij nu meer commands aan toevoegen:

Code Clientcontrol:

#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }
}

}
}


Nu gaan we er een 2e clientkick en 3e, 4e, etc aantoevoegen voor alle clients (tot aan waar de maker wil)

Dus deze code hierboven, dan doe je copy/paste dit:

itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }
}


en dan voegen wij deze achter de 1e toe:


#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }

}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }
}
}

}


dan gaan we nu zorgen dat het client 1 wordt ipv client 0:

#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }

}
itemDef
{
name c1
visible 1
rect 22 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^701"
action
{
play "mouse_click";
exec "rcon clientkick 1";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^71 ";
}
mouseEnter { setitemcolor c1 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c1 backcolor 0 0 0 .75 }
}
}

}


dan doen we weer hetzelfde met dit alleen dan met client 2:

#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }

}
itemDef
{
name c1
visible 1
rect 22 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^701"
action
{
play "mouse_click";
exec "rcon clientkick 1";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^71 ";
}
mouseEnter { setitemcolor c1 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c1 backcolor 0 0 0 .75 }
}
itemDef
{
name c2
visible 1
rect 39 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^702"
action
{
play "mouse_click";
exec "rcon clientkick 2";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^72 ";
}
mouseEnter { setitemcolor c2 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c2 backcolor 0 0 0 .75 }

}
}

}


En verder met clients tot aan waar diegene wil.

Nu ga ik even een kleine uitleg geven over de plaats. jullie zien dat ik ook telkens de 1e value verander. Dit komt omdat deze de plek van links naar rechts verandert, en ik wil dat ze naast elkaar komen. En verander ik dit zomaar? Nee, natuurlijk niet. als je de 3e value kijkt, dan zie je hoe wijd het vakje is(de extensie op x-as). Dan neem je de oude value van de x-as en die doe je + de extensie van de x-as, dus: 5 + 17 = 22. Daarna: 22 + 17 = 39. Enzovoorts. Maar als men aan het einde van het rcontoolvakje komt, dan kan je niet meer naar rechts. Dan pak je weer de allereerste client (client 0).
Dan copy/paste je die en doe je dit:

#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }

}
itemDef
{
name c1
visible 1
rect 22 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^701"
action
{
play "mouse_click";
exec "rcon clientkick 1";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^71 ";
}
mouseEnter { setitemcolor c1 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c1 backcolor 0 0 0 .75 }
}
itemDef
{
name c2
visible 1
rect 39 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^702"
action
{
play "mouse_click";
exec "rcon clientkick 2";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^72 ";
}
mouseEnter { setitemcolor c2 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c2 backcolor 0 0 0 .75 }

}
itemDef
{
name c15
visible 1
rect 5 30 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^715"
action
{
play "mouse_click";
exec "rcon clientkick 15";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^715 ";
}
mouseEnter { setitemcolor c15 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c15 backcolor 0 0 0 .75 }

}

}

}


Dan pak je de 2e en 4e value, tel je die bij elkaar op, en dan zit je een regel lager. Dan ga je zo door:

#include "ui_mp/menudef.h"

#define ORIGIN_CLIENT 32 256

{
menuDef
{
name "client"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close client;
open rcon;
}
itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_CLIENT
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name c0
visible 1
rect 5 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^700"
action
{
play "mouse_click";
exec "rcon clientkick 0";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^70 ";
}
mouseEnter { setitemcolor c0 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c0 backcolor 0 0 0 .75 }

}
itemDef
{
name c1
visible 1
rect 22 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^701"
action
{
play "mouse_click";
exec "rcon clientkick 1";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^71 ";
}
mouseEnter { setitemcolor c1 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c1 backcolor 0 0 0 .75 }
}
itemDef
{
name c2
visible 1
rect 39 15 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^702"
action
{
play "mouse_click";
exec "rcon clientkick 2";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^72 ";
}
mouseEnter { setitemcolor c2 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c2 backcolor 0 0 0 .75 }

}
itemDef
{
name c15
visible 1
rect 5 30 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^715"
action
{
play "mouse_click";
exec "rcon clientkick 15";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^715 ";
}
mouseEnter { setitemcolor c15 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c15 backcolor 0 0 0 .75 }

}
itemDef
{
name c16
visible 1
rect 22 30 17 15
origin ORIGIN_CLIENT
type ITEM_TYPE_BUTTON
style UI_BUTTON_STYLE
textstyle UI_BUTTON_TEXT_STYLE
forecolor UI_BUTTON_TEXT_COLOR
backcolor 0 0 0 .75
border UI_BUTTON_BORDER
bordercolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 3
textaligny 10
text "^716"
action
{
play "mouse_click";
exec "rcon clientkick 16";
exec "wait 10";
exec "rcon say ^4||^7Kicked Player^4||^1: ^716 ";
}
mouseEnter { setitemcolor c16 backcolor 0 0 1 .65;play "mouse_over"; }
mouseExit { setitemcolor c16 backcolor 0 0 0 .75 }

}


}

}


Dan gaan we nu werken aan een map.menu. Dit zal niet zo moeilijk zijn, maar ook weer niet precies copy/paste als in client. We hebben dus rcon.menu:
#include "ui_mp/menudef.h"


#define ORIGIN_RCON 32 256

{
menuDef
{
name "rcon"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_RCON
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name client
group ingamebox
visible 1
rect 5 -10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Client Control^4||"
action
{
play "mouse_click";
close rcon;
open client;
}
onFocus
{
play "mouse_over";
}
}
}
}


dan gaan we nu maps eraan toevoegen:
#include "ui_mp/menudef.h"


#define ORIGIN_RCON 32 256

{
menuDef
{
name "rcon"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_RCON
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name client
group ingamebox
visible 1
rect 5 -10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Client Control^4||"
action
{
play "mouse_click";
close rcon;
open client;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name map
group ingamebox
visible 1
rect 5 10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Map Control^4||"
action
{
play "mouse_click";
close rcon;
open map;
}
onFocus
{
play "mouse_over";
}
}

}
}


Dan ga je nu in je ingame.txt file uit [ui_mp]:

// ingame menu defs
//
{
loadMenu { "ui_mp/ingame.menu" }
loadMenu { "ui_mp/ingame_controls.menu" }
loadMenu { "ui_mp/ingame_options.menu" } // loadMenu { "ui_mp/ingame_options.menu" }
loadMenu { "ui_mp/ingame_system.menu" } // loadMenu { "ui_mp/ingame_system.menu" }
loadMenu { "ui_mp/ingame_leave.menu" }
loadMenu { "ui_mp/ingame_callvote.menu" }
loadMenu { "ui_mp/wm_quickmessage.menu" }

loadMenu { "ui_mp/scriptmenus/rcon.menu" }
loadMenu { "ui_mp/scriptmenus/client.menu" }
}

Dan ga je je map.menu precachen:

// ingame menu defs
//
{
loadMenu { "ui_mp/ingame.menu" }
loadMenu { "ui_mp/ingame_controls.menu" }
loadMenu { "ui_mp/ingame_options.menu" } // loadMenu { "ui_mp/ingame_options.menu" }
loadMenu { "ui_mp/ingame_system.menu" } // loadMenu { "ui_mp/ingame_system.menu" }
loadMenu { "ui_mp/ingame_leave.menu" }
loadMenu { "ui_mp/ingame_callvote.menu" }
loadMenu { "ui_mp/wm_quickmessage.menu" }

loadMenu { "ui_mp/scriptmenus/rcon.menu" }
loadMenu { "ui_mp/scriptmenus/client.menu" }
loadMenu { "ui_mp/scriptmenus/map.menu" }
}


dan maken we nu weer zo'n standaard file:

#include "ui_mp/menudef.h"

#define ORIGIN_MAP 32 256

{
menuDef
{
name "map"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0";
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0";
}
onEsc
{
close map;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_MAP
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
}
}


LET WEER OP DE ORIGIN!

Dan gaan we nu een paar map commands toevoegen:

#include "ui_mp/menudef.h"

#define ORIGIN_MAP 32 256

{
menuDef
{
name "map"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0";
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0";
}
onEsc
{
close map;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_MAP
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name map1
group ingamebox
visible 1
rect 10 5 70 10
origin ORIGIN_MAP
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^7Brecourt"
action
{
play "mouse_click";
exec "rcon say ^4||^7Brecourt Will Start Now^4||";
exec "wait 100";
exec "rcon map mp_brecourt";
}
onFocus
{
play "mouse_over";
}
}
}
}


Dan voegen we nu een 2e map aan toe:

#include "ui_mp/menudef.h"

#define ORIGIN_MAP 32 256

{
menuDef
{
name "map"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0";
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0";
}
onEsc
{
close map;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_MAP
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name map1
group ingamebox
visible 1
rect 10 5 70 10
origin ORIGIN_MAP
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^7Brecourt"
action
{
play "mouse_click";
exec "rcon say ^4||^7Brecourt Will Start Now^4||";
exec "wait 100";
exec "rcon map mp_brecourt";
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name map2
group ingamebox
visible 1
rect 10 17 70 10
origin ORIGIN_MAP
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^7Depot"
action
{
play "mouse_click";
exec "rcon say ^4||^7Depot Will Start Now^4||";
exec "wait 100";
exec "rcon map mp_Depot";
}
onFocus
{
play "mouse_over";
}
}

}
}


en zo doe je dit weer met iedere map. Let er wel weer op dat je de y-as of x-as ook verandert!

Dan komen wij nu bij het albekende Rconpassword menu. Ik zal het gewoon geven, en dan moet je zelf maar kijken wat je ervan gaat maken:

#include "ui_mp/menudef.h"

#define ORIGIN_RCONPASS 256 256

{
menuDef
{
name "rconpass"
visible 1
fullscreen 0
rect 0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0";
exec "setfromcvar ui_rconpassword rconpassword";
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0";
exec "setfromcvar rconpassword ui_rconpassword";
}
onEsc
{
close rconpass;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect -224 -25 224 220
origin ORIGIN_RCONPASS
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name rconpassdec
group ingamebox
visible 1
rect -210 20 130 20
origin ORIGIN_RCONPASS
type ITEM_TYPE_TEXT
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .23
textalignx 5
textaligny 12
autowrapped
text "^4E^7nter ^4R^7con ^4P^7assword ^4H^7ere^1:"
decoration
}

itemDef
{
name rcon_password
visible 1
rect -200 50 114 18
origin ORIGIN_RCONPASS
forecolor OPTIONS_CONTROL_FORECOLOR
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
type ITEM_TYPE_EDITFIELD
text " "
cvar "ui_rconpassword"
maxchars 12
textfont UI_FONT_NORMAL
textscale .23
textalign ITEM_ALIGN_RIGHT
textalignx 0
textaligny 10
mouseEnter
{
play "mouse_over";
}

}
itemDef
{
name back
group ingamebox
visible 1
rect -200 180 100 10
origin ORIGIN_RCONPASS
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^4||^7Back To Menu^4||"
action
{
play "mouse_click";
close rconpass;
open rcon;
}
onFocus
{
play "mouse_over";
}
}
}
}


let weer op, verander de origin weer!
zoals je kan zien zijn er weer een paar extra dingen bijgekomen:

exec "setfromcvar ui_rconpassword rconpassword"; zorgt ervoor dat de text in het vlak de rconpassword uit jouw eigen server.cfg wordt

exec "setfromcvar rconpassword ui_rconpassword"; zorgt ervoor dat de text in het vlak de rconpassword wordt die vanaf dat mooment gelezen moet worden.

maxchars: maximale hoeveelheid characters.
cvar: de cvar die gezet moet worden. ui_(cvar)
ITEM_TYPE_EDITFIELD: textvlak dat veranderd kan worden.

Weer precachen in ingame.txt:


// ingame menu defs
//
{
loadMenu { "ui_mp/ingame.menu" }
loadMenu { "ui_mp/ingame_controls.menu" }
loadMenu { "ui_mp/ingame_options.menu" } // loadMenu { "ui_mp/ingame_options.menu" }
loadMenu { "ui_mp/ingame_system.menu" } // loadMenu { "ui_mp/ingame_system.menu" }
loadMenu { "ui_mp/ingame_leave.menu" }
loadMenu { "ui_mp/ingame_callvote.menu" }
loadMenu { "ui_mp/wm_quickmessage.menu" }

loadMenu { "ui_mp/scriptmenus/rcon.menu" }
loadMenu { "ui_mp/scriptmenus/client.menu" }
loadMenu { "ui_mp/scriptmenus/map.menu" }
loadMenu { "ui_mp/scriptmenus/rconpass.menu" }
}


en een button maken in rcon.menu(main):
#include "ui_mp/menudef.h"


#define ORIGIN_RCON 32 256

{
menuDef
{
name "rcon"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_RCON
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name client
group ingamebox
visible 1
rect 5 -10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Client Control^4||"
action
{
play "mouse_click";
close rcon;
open client;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name map
group ingamebox
visible 1
rect 5 10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Map Control^4||"
action
{
play "mouse_click";
close rcon;
open map;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name rconpass
group ingamebox
visible 1
rect 5 30 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^Rcon Password^4||"
action
{
play "mouse_click";
close rcon;
open rconpass;
}
onFocus
{
play "mouse_over";
}
}


}
}


Voor de rest kan ik hier niet veel over zeggen, dit is gewoon zoals het is.


**EXTRA**
Wordt jij er ook altijd zo zat van iedere keer je naam te moeten veranderen in het optie menu?
Dan kan je 3 dingen doen:
1) Binds maken
2) console /name "{naam}"
3) Maak een name changer in je rcontool!

Hier komt-ie dan:

ik heb een aparte tab gemaakt voor dit, maar ik zal hem nu even toevoegen bij de rconpasswordmenu:


#include "ui_mp/menudef.h"

#define ORIGIN_RCONPASS 256 256

{
menuDef
{
name "rconpass"
visible 1
fullscreen 0
rect 0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0";
exec "setfromcvar ui_rconpassword rconpassword";
exec "setfromcvar ui_name name"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0";
exec "setfromcvar rconpassword ui_rconpassword";
exec "setfromcvar name ui_name"
}
onEsc
{
close rconpass;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect -224 -25 224 220
origin ORIGIN_RCONPASS
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name rconpassdec
group ingamebox
visible 1
rect -210 20 130 20
origin ORIGIN_RCONPASS
type ITEM_TYPE_TEXT
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .23
textalignx 5
textaligny 12
autowrapped
text "^4E^7nter ^4R^7con ^4P^7assword ^4H^7ere^1:"
decoration
}

itemDef
{
name rcon_password
visible 1
rect -200 50 114 18
origin ORIGIN_RCONPASS
forecolor OPTIONS_CONTROL_FORECOLOR
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
type ITEM_TYPE_EDITFIELD
text " "
cvar "ui_rconpassword"
maxchars 12
textfont UI_FONT_NORMAL
textscale .23
textalign ITEM_ALIGN_RIGHT
textalignx 0
textaligny 10
mouseEnter
{
play "mouse_over";
}

}
itemDef
{
name name
visible 1
rect -200 100 114 18
origin ORIGIN_RCONPASS
forecolor OPTIONS_CONTROL_FORECOLOR
backcolor .5 .5 .5 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
type ITEM_TYPE_EDITFIELD
text " "
cvar "ui_name"
maxchars 30
textfont UI_FONT_NORMAL
textscale .23
textalign ITEM_ALIGN_RIGHT
textalignx 0
textaligny 10
mouseEnter
{
play "mouse_over";
}

}

itemDef
{
name back
group ingamebox
visible 1
rect -200 180 100 10
origin ORIGIN_RCONPASS
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^4||^7Back To Menu^4||"
action
{
play "mouse_click";
close rconpass;
open rcon;
}
onFocus
{
play "mouse_over";
}
}
}
}


LET OP!
ik heb de background collor grijs gemaakt, omdat je anders de zwarte niet ziet, dus niet schrikken!
**EXTRA**

Nu komt er een leuk iets wat nog maar erg weinig rcontools hebben. Namelijk een config.
Dit is niet erg moeilijk, maar tog wel een beetje.

De Config:
Wat je hier allemaal in kan stoppen, mag je zelf weten. Het kunnen rconmessages zijn of zelfgemaakte mappen of wat anders.

////////////////////////////
//// ////
// L4zY's Config //
//// ////
////////////////////////////


// Admin Name
//
// Fill in your own name (Call Of Duty name)

#define ADMIN_NAME "^7L4zY"
#define ADMIN_NAME2 "^7AerOX"
#define COADMIN_NAME "^7Citizen"
#define COADMIN_NAME2 "^7Tib"
#define COADMIN_NAME3 "^7Juvinile"

#define MSG_1 "Admins Are "ADMIN_NAME", " ADMIN_NAME2". Co-admins are "COADMIN_NAME", "COADMIN_NAME2", and "COADMIN_NAME3"."
#define MSG_2 "Hacks, Cheats, FR and FF = KICK!"
#define MSG_3 "Be Fair And Stay Fair!"
#define MSG_4 "||"ADMIN_NAME"|| Is Online!"
#define MSG_5 "The Admin is ALWAYS(!!) Right, Even When He's Wrong!"

#define MAP_1 "jm_krime"
#define MAP_2 "vikings_omaha"
#define MAP_3 "nm_skyscraper"
#define MAP_4 "jm_milestone"
#define MAP_5 "-"


Het begint altijd met #define, dan komt de naam van hetgene dat je wilt definen en dan tussen "aanhalingstekens" hetgene wat gedefineerd moet worden.

Dan sla je deze file op in main als: {naam}.h en laten we nu voor mijn gemak L4zY_config.h doen.
Deze moet opgeslagen worden in je main map.
LET OP!!!
de extensie MOET veranderd worden in h. Niet dat je een bestand krijgt als L4zY_config.h.txt . FOUT!!

Dan gaan we nu kijken hoe wij deze moeten gebruiken.
Rcon message center:
Precache in ingame.txt:

// ingame menu defs
//
{
loadMenu { "ui_mp/ingame.menu" }
loadMenu { "ui_mp/ingame_controls.menu" }
loadMenu { "ui_mp/ingame_options.menu" } // loadMenu { "ui_mp/ingame_options.menu" }
loadMenu { "ui_mp/ingame_system.menu" } // loadMenu { "ui_mp/ingame_system.menu" }
loadMenu { "ui_mp/ingame_leave.menu" }
loadMenu { "ui_mp/ingame_callvote.menu" }
loadMenu { "ui_mp/wm_quickmessage.menu" }

loadMenu { "ui_mp/scriptmenus/rcon.menu" }
loadMenu { "ui_mp/scriptmenus/client.menu" }
loadMenu { "ui_mp/scriptmenus/map.menu" }
loadMenu { "ui_mp/scriptmenus/rconpass.menu" }
loadMenu { "ui_mp/scriptmenus/rconmsg.menu" }
}

en maak een button in je rcon.menu(main):
#include "ui_mp/menudef.h"


#define ORIGIN_RCON 32 256

{
menuDef
{
name "rcon"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_RCON
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name client
group ingamebox
visible 1
rect 5 -10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Client Control^4||"
action
{
play "mouse_click";
close rcon;
open client;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name map
group ingamebox
visible 1
rect 5 10 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^7Map Control^4||"
action
{
play "mouse_click";
close rcon;
open map;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name rconpass
group ingamebox
visible 1
rect 5 30 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^Rcon Password^4||"
action
{
play "mouse_click";
close rcon;
open rconpass;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name rconmsg
group ingamebox
visible 1
rect 5 50 80 20 //10 5 110 20
origin ORIGIN_RCON
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 12
text "^4||^Rcon Messages^4||"
action
{
play "mouse_click";
close rcon;
open rconmsg;
}
onFocus
{
play "mouse_over";
}
}

}
}


Dan weer zo'n bestandje maken. ORIGIN VERANDEREN!:
#include "ui_mp/menudef.h"

#include "L4zY_config.h"

#define ORIGIN_RCONMSG 32 256

{
menuDef
{
name "rconmsg"
visible 1
fullscreen 0
rect 0 0 750 700 //0 0 750 700
focuscolor UI_FOCUS_COLOR
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
border 0

onOpen
{
setCvar cl_bypassMouseInput "0"
close rcon;
}
onClose
{
setCvar cl_bypassMouseInput "0"
}
onEsc
{
close rconmsg;
open rcon;
}

itemDef
{
name "window_background"
visible 1
rect 0 -25 224 220
origin ORIGIN_RCONMSG
forecolor 1 1 1 1
backcolor 0 0 0 .75
style WINDOW_STYLE_FILLED
border 1
bordercolor 1 1 1 1
decoration
}
itemDef
{
name adminonlinemsg
group ingamebox
visible 1
rect 10 25 70 10
origin ORIGIN_RCONMSG
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^4||^7Admin Online ^4||"
action
{
play "mouse_click";
exec "rcon say "MSG_1;
}
onFocus
{
play "mouse_over";
}
}
itemDef
{
name adminonlinemsg
group ingamebox
visible 1
rect 10 25 70 10
origin ORIGIN_RCONMSG
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^4||^7"MSG_2"^4||"
action
{
play "mouse_click";
exec "rcon say "MSG_2;
}
onFocus
{
play "mouse_over";
}
}

}
}


En dan gaan we nu even goed kijken!

Want, zoals jullie zien is er weer wat bijgekomen.
#include "L4zY_config.h": zorgt ervoor dat deze file, je config, gelezen wordt.
"^4||^7"MSG_2"^4||" : dit zorgt ervoor dat je eerst || ziet, dan de MSG_2 die gedefineerd wordt in je config, en dan weer ||.
Dus:||Hacks, Cheats, FR and FF = KICK!||
exec "rcon say "MSG_2; De command dat de message zegt. In dit geval dus Hacks, Cheats, FR and FF = KICK!
en zo doe je dat dus met iedere messsage.
**TIP**
Als je messages TE lang worden (>50 is te lang), dan gebruik je #define MSG_1_MEMO
Met deze functie kan je de gebruiker een memo van een woord of 3 laten zeggen wat de message inhoudt.
Bijvoorbeeld:
(dit is maar een klein deel van de originele files, dus let op)
Config:

(..)
//stel deze is te lang:
#define MSG_5 "The Admin is ALWAYS(!!) Right, Even When He's Wrong!"
#define MSG_5_MEMO "Admin Right"
(..)

RconMessages:

(..)
itemDef
{
name msg5
group ingamebox
visible 1
rect 10 25 70 10
origin ORIGIN_RCONMSG
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^4||^7"MSG_5_MEMO"^4||"
action
{
play "mouse_click";
exec "rcon say "MSG_5;
}
onFocus
{
play "mouse_over";
}
}


OF map menu:

itemDef
{
name map1
group ingamebox
visible 1
rect 10 17 70 10
origin ORIGIN_MAP
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .20
textalignx 5
textaligny 10
text "^7"MAP_1""
action
{
play "mouse_click";
exec "rcon say ^4||^7"MAP_1" Will Start Now^4||";
exec "wait 100";
exec "rcon map "MAP_1"";
}
onFocus
{
play "mouse_over";
}
}


Nou dit was het wel weer. Vragen kunnen opt forum, in PM's naar mij of ergens anders :P.
PS: Bij de rconpass heb ik -200 enzo gebruikt. Hoe dat komt weet ik ook niet maar ik moest dit wel doen.

Tutorial gemaakt door LaZy

Inloggen

Online users
Nieuwste lid:
mericin

· IzNoGoD<5 min
· Fristi00:10:10
· LazY00:12:09
· Niels00:21:19
· wollephoenix00:54:35
· BoydelaMorte01:10:57
· usselite01:43:07
· vinhui01:50:21
· Wolph02:03:48
· mericin02:11:02
· Google[bot]Online

Gasten online: 5


Link ons

Partners

Links


Naar Boven

© 2006-2012 Modbase. Alle rechten voorbehouden. Disclaimer | Gedragscode

Custom coding by Stijn, Image fixing by Derix