(--eRRoR--)
11-13-2009, 01:39 PM
How can we make it if the server is set to start a player with a,lets say lvl 10 and before this seting was made he played and made lvl 2.When he will connect he will not receive lvl 10 like new players.
How can we make this?
Smokey
11-13-2009, 04:32 PM
it already checks if a player is less than the starting amount it will set them equal to the starting amount. However this only goes one way - up. If you lowered the starting amount no one would get lowered.
(--eRRoR--)
11-16-2009, 04:59 AM
but if a player has lvl 5 on my server and y set start lvl to 10 it doesent give it to him.
Smokey
11-16-2009, 09:08 AM
The code is there.
if ( xp < CVAR_STARTING_XP ) then it gives them the xp equal to starting xp. I think that this only works when starting method =1 (xp, not level).
//If starting XP is enabled, do the check
if ( CVAR_ENABLE_STARTING_SYSTEM )
{
if( CVAR_STARTING_METHOD == 1 )
{
//It is enabled and its set to XP based, so check to see if the starting XP is higher then what they have now
if ( xp < CVAR_STARTING_XP )
{
if ( CVAR_DEBUG_MODE )
{
//log_amx("DEBUG: MySQL->_LoadXP: XP Check TRUE - setting xp to starting amount of %d", CVAR_STARTING_XP);
}
//it must be, so lets set their XP and let them know
xp = CVAR_STARTING_XP;
if( Util_Should_Msg_Client(id) )
{
client_print ( id, print_chat, "[%s] %L", id, MOD, "STARTING_XP_MESSAGE", CVAR_STARTING_XP );
}
}
else
{
if ( CVAR_DEBUG_MODE )
{
//log_amx("DEBUG: MySQL->_LoadXP: XP Check FALSE - leaving xp at loaded amount of %d", xp );
}
}
}
else
{
//Override default level if its a bot and use the bot level cvar
if( is_user_bot(id))
{
xp = xplevel_lev[CVAR_BOT_LEVEL];
}
else
{
new tempXP = xplevel_lev[CVAR_STARTING_LEVEL];
//It is enabled and its set to XP based, so check to see if the starting XP is higher then what they have now
if ( xp < tempXP )
{
if ( CVAR_DEBUG_MODE )
{
//log_amx("DEBUG: MySQL->_LoadXP: XP Check TRUE - setting xp to starting amount of %d", tempXP);
}
//it must be, so lets set their XP and let them know
xp = tempXP;
if( Util_Should_Msg_Client(id) )
{
client_print ( id, print_chat, "[%s] %L", id, MOD, "STARTING_LEVEL_MESSAGE", xp );
}
}
}
}
}
else
{
if( Util_Should_Msg_Client(id) )
{
client_print ( id, print_chat, "[%s] %L", id, MOD, "STARTING_XP_DISABLED" );
}
}
(--eRRoR--)
11-16-2009, 01:02 PM
Changed the start method from lvl to xp and it works now.
Thanks.