Raised This Month: $32 Target: $400
 8% 

Dragon Ball Mod 1.4 [Heroes vs Villains] (21 january 2016) [Added Beta]


Post New Thread Reply   
 
Thread Tools Display Modes
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 01-25-2016 , 12:51   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #41

Ok now see if I have not forgotten anything.
Attached Files
File Type: sma Get Plugin or Get Source (dragon_ball_mod.sma - 605 views - 100.4 KB)
File Type: txt dragon_ball_mod.txt (5.9 KB, 138 views)
__________________
Perfect Scrash is offline
Send a message via Skype™ to Perfect Scrash
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-29-2016 , 02:15   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #42

Quote:
Originally Posted by Perfect Scrash View Post
Ok now see if I have not forgotten anything.
I implemented some things that I liked: 1) one task system for the whole server, 2) the AMXX 182 and 183 optimized color system, 3) I removed the model update every second (no needed), added czbots support and 4) opmized no weapon pick up. I attached the newer file. Here you can see exactly what I changed. The others things not mentioned here, still need to be implemented.

If you have some doubts or trouble implementing/understanding, just ask me here or PM me.
  1. On 'menu_item_getinfo( menu, item, access, data, 5, iName, 63, callback )', 'static msg[ 191 ]', you still hard coding the string size, use charsmax( iName ).

  2. Use 'get_pcvar_num( cvar_friendlyfire )' instead of 'get_cvar_num("mp_friendlyfire")'. Because pcvars are much faster than cvars. Example:
    Code:
    new cvar_friendlyfire = get_cvar_pointer( "mp_friendlyfire" ) plugin_init() {     cvar_friendlyfire = get_cvar_pointer( "mp_friendlyfire" ) } stock my_cool_function() {     ...     if( !is_user_alive(vic)         || cs_get_user_team(id) == cs_get_user_team(vic)         && !get_pcvar_num( cvar_friendlyfire ) )     ... }

  3. You were updating the all players model every second. No need to do that.

  4. Remove the game native skim choosher that appears after you choose team using your team chooser.

  5. If you choose the spectator team, when entering at the server for the first time, the user stays locked/blocked on the opening camera, without moving around or watching others playing.

  6. Cache the 'get_user_msgid("DeathMsg")' value used on 'extra_dmg(id, attacker, damage, weaponDescription[])' at 'plugin_init' using a global variable.

  7. You forward 'fwd_Touch' is called a lot, just to not pick up weapons. Could you just hook WeaponPickUp event? See for help: Block weapon pick-up without c4.

  8. You removed the color_chat compatibility optimization with amxx 183.

  9. The forward 'RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 )' do not support czbots.

  10. I got this, just running the server some minutes.
    Spoiler
    See more details about that on amxmodx profiler thread. To cache the value of 'cs_get_user_team' and others as I cached 'is_user_alive', seen unncessary because once 'vexd_pfntouch' is replaced, the others natives also called as high as 'vexd_pfntouch' is will get improved, because they are called within 'vexd_pfntouch'. I cached 'is_user_alive' because it was called multiple times per second on multiple places. See some natives vs caches on the profiler to see some results. To know more about this see Optimizing Plugins: Cache Results on a Larger Scale? and Function checks vs variables.

  11. Dont use anything from amxmod_compact as your 'vexd_pfntouch'. This is called too much on some game play minutes.
    Code:
       p |                     model_change |         40 | 0.000062 / 0.000000 / 0.000003    p |                       plugin_cfg |          1 | 0.000002 / 0.000002 / 0.000002    p |                      plugin_init |          1 | 0.000064 / 0.000064 / 0.000064    p |                   plugin_natives |          1 | 0.000004 / 0.000004 / 0.000004    p |                  plugin_precache |          1 | 0.000100 / 0.000100 / 0.000100    p |                   powerup_effect |        255 | 0.013942 / 0.000010 / 0.000381    p |                round_start_event |          1 | 0.000002 / 0.000002 / 0.000002
       p |                    vexd_pfntouch |      53680 | 0.055880 / 0.000000 / 0.000278
    See the thread Best touch function for alternatives to it. Here above you can see that 'model_change' was called just 40 times, but it is because I already have removed its per second update on all players.

  12. As task operations are expensive operations, better to have only one task that is created when the first player is put in to the server, and removed when the last player disconnects. And when someone is put in server/disconnected, add/remove its id to the current players ids array. Then on that task, loop through all players on that list. Hence 'ShowHUD' and 'dbz_loop' first code part, were merged on 'iterate_through_players'. And now, on 'fwd_PlayerSpawn', must be removed the 'set_task', as we just have one now:
    Code:
        if(!task_exists(id+TASK_LOOP))         set_task(1.0, "dbz_loop", id+TASK_LOOP, "", 0, "b");

  13. From your 'client_putinserver' was removed:
    Code:
        if (g_power[3][id] > 0) remove_power(id, g_power[3][id]);     g_villain_id[id] = 0     g_hero_id[id] = 0     g_power[2][id] = 0     g_power[0][id] = 0
    Because it is already done on 'client_disconnect' and a client cannot connect without disconnect first, then just removed then at client disconnect.
Attached Files
File Type: sma Get Plugin or Get Source (dragon_ball_mod.sma - 542 views - 108.2 KB)
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-29-2016 at 02:31. Reason: spelling fix
addons_zz is offline
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 12-31-2019 , 12:36   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #43

Added Beta Version: You can chech here: (Click Here)

Resouces from Beta version: Download Here

Code:
v 1.5 (Beta):
	* Cached Itens for reduce lag/delay (Thanks addons_zz for helping)
	* No Amx 1.8.2 Suport now (Now requires AMX 1.8.3 or higher)
	* Removed set_user_model plugin needed (Because of cstrike module fixes on AMX 1.8.3)
	* Optimed Code
	* Removed Redudant Resources
	* DBZ tag changed to DBM in cvars
	* Added Omega Shenron Sounds
	* Added Frieza's Golden Form
	* Changed Vegeta SSJ3 to Vegeta SSJ Blue
	* Power up description updated on lang (Lang Updated)
__________________
Perfect Scrash is offline
Send a message via Skype™ to Perfect Scrash
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-31-2019 , 15:07   Re: Dragon Ball Mod 1.4 [Heroes vs Villains] (21 january 2016) [Added Beta]
Reply With Quote #44

That video shows amazing work. It looks very commercial.
__________________

Last edited by DJEarthQuake; 01-01-2020 at 01:17.
DJEarthQuake is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode