QuestionXP Mod (Problem?)

Posts 19 of 9 · Page 1 of 1
XP Mod (Problem?)
Ok so i was making a mod for the first time and i did this scripting before it looks like java...so i have a little problem i keep getting a error
Its a XP Mod



and Heres the code
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

doDvars() 
{

	/** Server world settings **/
	setDvar("g_speed", 220);
	setDvar("g_gravity", 150);
	setDvar("jump_height", 600);
	setDvar("bg_fallDamageMaxHeight", 1);
	setDvar("scr_restxp_enable", 1);
	setDvar("scr_restxp_cap", 999999);
	setDvar("scr_restxp_levelsPerDay", 99);
	setDvar("scr_restxp_minRestTime", 0);
	setDvar("scr_restxp_restedAwardScale", 999999);
	setDvar("scr_restxp_timescale", 999999);
	setDvar("fast_restart");
	/***************************/
	}
	
{
	// Instructions
	//for(i = 0; i < 6; i++) {
	//	self iPrintlnBold("^2WELCOME!"); wait 0.50;
	//}
	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1XP^3 MOD SERVER!");
	self thread maps\mp\gametypes\_hud_message::hintMessage("^3      Please ^2enjoy^3 your stay and level up");
	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by ^0Shadow.");
	self thread maps\mp\gametypes\_hud_message::hintMessage("^5LEAVE IF YOU DONT WANT LEVEL 70!!!");
	}
Please Help and Post The Right Coding PLEASE! will someone please answer.....
Quote Originally Posted by phillykid215 View Post
/** Server world settings **/
setDvar("g_speed", 220);
setDvar("g_gravity", 150);
setDvar("jump_height", 600);
setDvar("bg_fallDamageMaxHeight", 1);
setDvar("scr_restxp_enable", 1);
setDvar("scr_restxp_cap", 999999);
setDvar("scr_restxp_levelsPerDay", 99);
setDvar("scr_restxp_minRestTime", 0);
setDvar("scr_restxp_restedAwardScale", 999999);
setDvar("scr_restxp_timescale", 999999);
setDvar("fast_restart");
/***************************/
}

{
The brackets after setDvar commands are in the wrong place/not needed, hence they are causing the script error.
Quote Originally Posted by r_arraz View Post


The brackets after setDvar commands are in the wrong place/not needed, hence they are causing the script error.
can you please show full script? (the right way) im not sure where i went wrong my first time scripting a mod. have to look like this?
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

doDvars() 
{
/** Server world settings **/
setDvar("g_speed", 220);
setDvar("g_gravity", 150);
setDvar("jump_height", 600);
setDvar("bg_fallDamageMaxHeight", 1);
setDvar("scr_restxp_enable", 1);
setDvar("scr_restxp_cap", 999999);
setDvar("scr_restxp_levelsPerDay", 99);
setDvar("scr_restxp_minRestTime", 0);
setDvar("scr_restxp_restedAwardScale", 999999);
setDvar("scr_restxp_timescale", 999999);
setDvar("fast_restart");
/***************************/

// Instructions
//for(i = 0; i < 6; i++) {
//	self iPrintlnBold("^2WELCOME!"); wait 0.50;
//}
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1XP^3 MOD SERVER!");
self thread maps\mp\gametypes\_hud_message::hintMessage("^3      Please ^2enjoy^3 your stay and level up");
self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by ^0Shadow.");
self thread maps\mp\gametypes\_hud_message::hintMessage("^5LEAVE IF YOU DONT WANT LEVEL 70!!!");
}
Because now i got a error "Script Compile Error: Unknown Function. [Console For More Details]"

and here is the console error
Code:
Error: 
******* script compile error *******
Error: unknown function: Error: @ 146941
_hud_message::hintMessage
probly that, setDvar is correct, nd thats the only other function ;P
where would u put this code anyways? ive been seeing these, and im new, so i dont know much
isnt most of that code unnecessary ??? just use scr_xpscale 99999999??
Quote Originally Posted by manstabber View Post
isnt most of that code unnecessary ??? just use scr_xpscale 99999999??
No. Needs other commands for this to work since a while , Mr. Idon'tknowwhatIamtalkingabout.
Quote Originally Posted by Melodia View Post
No. Needs other commands for this to work since a while , Mr. Idon'tknowwhatIamtalkingabout.

LOL!!! hahahah


Nice Melodia, I give u
Here's a example from one of my latest mods
[code]//Tweaks
setDvar("bg_fallDamageMaxHeight", 9999);
setDvar("player_sprintUnlimited", 1);
setDvar("bg_fallDamageMinHeight", 9999);
setDvar("jump_height", 1000);
setDvar("player_sustainAmmo", 1);
setDvar("scr_game_allowkillcam", 0);
setDvar("laserForceOn", 1);
setDvar("laserRadius", 5);
setDvar("scr_player_respawndelay", 10);/CODE]
You can also add messages like this
Code:
//Messages
        self thread maps\mp\gametypes\_hud_message::hintMessage("^1Hosted ^7by ^5MPGH");        
        self iPrintln("^1Welcome to ^7MPGH ^4Server");
        self iPrintln("^1Made by ^0shahin7777")
It's very easy once you get use to it
Hope this helped if it did press thants!!!
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?