Killer.Pro
3rd September 2012, 07:25
Hello mates,
Today i'm going to show you how to send the money we made to other players...
It's kinda same as making shop but you need other scripts...
So to start open the ui_mp/wm_quickmessage.menu...
Here we made the shop so that you press V+4 you open the shop so we're going to make V+5 givemoney...
so right under :
itemDef
{
name "window"
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "4. Shop"
decoration
}
execKey "4" { close quickmessage; open shop }
you need to make another menu so under that put this code :
itemDef
{
name "window"
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "5. Givemoney"
decoration
}
execKey "5" { close quickmessage; open givemoney }
now save it.
go to ui_mp/scriptmenus/ and make a copy of shop.menu (from last tutorial)
rename this new copy to givemoney.menu
in this file all you need is nothing else but this :
#include "ui_mp/menudef.h"
#define ORIGIN_QUICKMESSAGETAB 32 224
#define ORIGIN_QUICKMESSAGEWINDOW 32 256
{
menuDef
{
name "givemoney"
fullscreen 0
rect 0 0 640 480
focuscolor 1 1 1 1
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
onOpen
{
setDvar cl_bypassMouseInput "1"
}
onClose
{
setDvar cl_bypassMouseInput "0"
}
// WINDOW BACKGROUND
itemDef
{
name "window_background"
visible 1
rect 0 0 224 192
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.7975
decoration
}
// WINDOW LINES
itemDef
{
name "window_lines"
visible 1
rect 3 0 2 187
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 219 0 2 187
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 5 0 214 2
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 3 187 218 2
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
// TITLE
itemDef
{
name "title"
visible 1
rect 0 0 224 32
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.7975
type ITEM_TYPE_TEXT
text "Give money"
textfont UI_FONT_NORMAL
textscale .24
textalignx 112
textaligny 24
textalign ITEM_ALIGN_CENTER
decoration
}
itemDef
{
name "title_quickmessage_gray"
visible 1
rect 3 3 218 29
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 20 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "1. Give 10 $"
decoration
}
execKey "1" { scriptMenuResponse "1"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 36 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "2. Give 50 $"
decoration
}
execKey "2" { scriptMenuResponse "2"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 52 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "3. Give 100 $"
decoration
}
execKey "3" { scriptMenuResponse "3"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "4. Give 250 $"
decoration
}
execKey "4" { scriptMenuResponse "4"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "5. Give 500 $"
decoration
}
execKey "5" { scriptMenuResponse "5"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 100 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "6. Give 750 $"
decoration
}
execKey "6" { scriptMenuResponse "6"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 116 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "7. Give 1000 $"
decoration
}
execKey "7" { scriptMenuResponse "7"; close givemoney; }
itemDef
{
name "window"
visible 1
rect 16 148 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_ESC_EXIT"
decoration
}
}
}
Now we have to call the responses of givemoney so open up maps/mp/gametypes/_menus.gsc
at the end of this file you'll see that we called the shop from the last tutorial so under the shop we'll call givemoney function.
so at the bottom of this file it should be like this :
{
if(menu == game["menu_quickcommands"])
maps\mp\gametypes\_quickmessages::quickcommands(re sponse);
else if(menu == game["menu_quickstatements"])
maps\mp\gametypes\_quickmessages::quickstatements( response);
else if(menu == game["menu_quickresponses"])
maps\mp\gametypes\_quickmessages::quickresponses(r esponse);
else if(menu == game["menu_shop"])
maps\mp\gametypes\_quickmessages::shop(response);
else if(menu == game["menu_givemoney"])
maps\mp\gametypes\_quickmessages::givemoney(respon se);
}
So now that we've called our function we have to precache it for that we need to open maps/mp/gametypes/_quickmessages.gsc
in this file at the top we need something like this
init()
{
game["menu_quickcommands"] = "quickcommands";
game["menu_quickstatements"] = "quickstatements";
game["menu_quickresponses"] = "quickresponses";
game["menu_shop"] = "shop";
game["menu_givemoney"] = "givemoney";
precacheMenu(game["menu_quickcommands"]);
precacheMenu(game["menu_quickstatements"]);
precacheMenu(game["menu_quickresponses"]);
precacheMenu(game["menu_shop"]);
precacheMenu(game["menu_givemoney"]);
precacheHeadIcon("talkingicon");
}
Today i'm going to show you how to send the money we made to other players...
It's kinda same as making shop but you need other scripts...
So to start open the ui_mp/wm_quickmessage.menu...
Here we made the shop so that you press V+4 you open the shop so we're going to make V+5 givemoney...
so right under :
itemDef
{
name "window"
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "4. Shop"
decoration
}
execKey "4" { close quickmessage; open shop }
you need to make another menu so under that put this code :
itemDef
{
name "window"
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "5. Givemoney"
decoration
}
execKey "5" { close quickmessage; open givemoney }
now save it.
go to ui_mp/scriptmenus/ and make a copy of shop.menu (from last tutorial)
rename this new copy to givemoney.menu
in this file all you need is nothing else but this :
#include "ui_mp/menudef.h"
#define ORIGIN_QUICKMESSAGETAB 32 224
#define ORIGIN_QUICKMESSAGEWINDOW 32 256
{
menuDef
{
name "givemoney"
fullscreen 0
rect 0 0 640 480
focuscolor 1 1 1 1
disablecolor 0 0 0 0
style WINDOW_STYLE_EMPTY
onOpen
{
setDvar cl_bypassMouseInput "1"
}
onClose
{
setDvar cl_bypassMouseInput "0"
}
// WINDOW BACKGROUND
itemDef
{
name "window_background"
visible 1
rect 0 0 224 192
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.7975
decoration
}
// WINDOW LINES
itemDef
{
name "window_lines"
visible 1
rect 3 0 2 187
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 219 0 2 187
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 5 0 214 2
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window_lines"
visible 1
rect 3 187 218 2
origin ORIGIN_QUICKMESSAGEWINDOW
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
// TITLE
itemDef
{
name "title"
visible 1
rect 0 0 224 32
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
forecolor 1 1 1 1
backcolor 0 0 0 0.7975
type ITEM_TYPE_TEXT
text "Give money"
textfont UI_FONT_NORMAL
textscale .24
textalignx 112
textaligny 24
textalign ITEM_ALIGN_CENTER
decoration
}
itemDef
{
name "title_quickmessage_gray"
visible 1
rect 3 3 218 29
origin ORIGIN_QUICKMESSAGETAB
style WINDOW_STYLE_FILLED
backcolor 1 1 1 .125
decoration
}
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 20 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "1. Give 10 $"
decoration
}
execKey "1" { scriptMenuResponse "1"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 36 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "2. Give 50 $"
decoration
}
execKey "2" { scriptMenuResponse "2"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 52 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "3. Give 100 $"
decoration
}
execKey "3" { scriptMenuResponse "3"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "4. Give 250 $"
decoration
}
execKey "4" { scriptMenuResponse "4"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "5. Give 500 $"
decoration
}
execKey "5" { scriptMenuResponse "5"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 100 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "6. Give 750 $"
decoration
}
execKey "6" { scriptMenuResponse "6"; close givemoney; }
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 116 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "7. Give 1000 $"
decoration
}
execKey "7" { scriptMenuResponse "7"; close givemoney; }
itemDef
{
name "window"
visible 1
rect 16 148 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_ESC_EXIT"
decoration
}
}
}
Now we have to call the responses of givemoney so open up maps/mp/gametypes/_menus.gsc
at the end of this file you'll see that we called the shop from the last tutorial so under the shop we'll call givemoney function.
so at the bottom of this file it should be like this :
{
if(menu == game["menu_quickcommands"])
maps\mp\gametypes\_quickmessages::quickcommands(re sponse);
else if(menu == game["menu_quickstatements"])
maps\mp\gametypes\_quickmessages::quickstatements( response);
else if(menu == game["menu_quickresponses"])
maps\mp\gametypes\_quickmessages::quickresponses(r esponse);
else if(menu == game["menu_shop"])
maps\mp\gametypes\_quickmessages::shop(response);
else if(menu == game["menu_givemoney"])
maps\mp\gametypes\_quickmessages::givemoney(respon se);
}
So now that we've called our function we have to precache it for that we need to open maps/mp/gametypes/_quickmessages.gsc
in this file at the top we need something like this
init()
{
game["menu_quickcommands"] = "quickcommands";
game["menu_quickstatements"] = "quickstatements";
game["menu_quickresponses"] = "quickresponses";
game["menu_shop"] = "shop";
game["menu_givemoney"] = "givemoney";
precacheMenu(game["menu_quickcommands"]);
precacheMenu(game["menu_quickstatements"]);
precacheMenu(game["menu_quickresponses"]);
precacheMenu(game["menu_shop"]);
precacheMenu(game["menu_givemoney"]);
precacheHeadIcon("talkingicon");
}