Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 3

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 3

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 3
.map :: Mapping for MoHAA

 
IRC :: #.map on Quakenet.org or simply go to irc://irc.quakenet.eu.org/.map
 

 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 57

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 57

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 57
 
 

Giving the Player some weapons :: AL
-------------------------------------------------------------------------------

Ascript is a file with the extension *.scr.
You will find one of these files provided with the MOH Tools. A fully compiled map should always have 2 .scr files accompanying i.e :

If your map is called test_x.bsp
Your scripts should be called test_x.scr and test_x_precache.scr

To make a scr file simply make a new txt file and rename the extension from txt to scr then reopen using notepad (I recommend using editpad).

The _precache.scr loads all models/anims/sound for the engine optimising the ram usage.

The .scr is the one we want …..This makes your game e.g. Makes that sniper snipe, controls game objectives, sound, doors, soldiers ,voices, vehicles… I think you get the idea.

Right are you ready. Here we go …..First create a map...Let's make a simple map (see first room tutorial). Or use the files provided..

Now lets make a script for this map….(oh dear this is where your brain , patience of a god , is required well at least in my case it was ..i now smoke 50 a day since becoming a moh mapper..OOo the stress)

Now make lets make a .scr (Script) file for the map {like I mentioned above}right open notepad/WordPad make a new txt file, open it and add the following

// place in your scr for reminders, tips etc
// ALANS MAP
// ARCHITECTURE: Alan Stables
// SCRIPTING: Alan Stables

exec global/ai.scr
exec global/loadout.scr maps/test_x.scr
main:
level waittill prespawn
exec global/ambient.scr test_x
level waittill spawn
$player item weapons/colt45.tik
fadein 2 0 0 0 1
wait 2
level.script = "maps/test_x.scr"

Right when you've done that save it as test_x.scr and place it in your mohaa\main\maps folder.

What does it all mean (well I thought that and I still do) heres a quick rundown on the script we have just written

exec global/ai.scr // enables the game ai
exec global/loadout.scr maps/test_x.scr // enables the script
level waittill prespawn // wait till loaded before spawning level
exec global/ambient.scr test_x // enables ambient sound for
// particular script

level waittill spawn //wiat till player client spawn
$player item weapons/colt45.tik // gives you a gun
fadein 2 0 0 0 1 // fades in the level
wait 2 // er wait
level.script = "maps/test_x.scr" //definies your scipt as .level.scipt
end

Compile your map and, hey presto, if you've made your script correctly you should start with a colt …(wahey!) you've just coded your first level…!

Need any help : Ask in the Forum

 


 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 176

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 176

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 176


 


Warning: require(): open_basedir restriction in effect. File(/home/map/cgi-bin/mohaa/poll/include/config.inc.php) is not within the allowed path(s): (/var/www/vhosts/own3mall/mohaaaa.co.uk:/usr/share/php:/usr/share/pear) in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 187

Warning: require(/home/map/cgi-bin/mohaa/poll/include/config.inc.php): failed to open stream: Operation not permitted in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 187

Fatal error: require(): Failed opening required '/home/map/cgi-bin/mohaa/poll/include/config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/player_weapons.php on line 187