Raised This Month: $51 Target: $400
 12% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
nikusha774
Junior Member
Join Date: Apr 2015
Old 07-22-2015 , 13:12   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #31

when any player join server stop working please fix
nikusha774 is offline
Send a message via Skype™ to nikusha774
nikusha774
Junior Member
Join Date: Apr 2015
Old 07-22-2015 , 13:15   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #32

when any player join server stop working please fix it
nikusha774 is offline
Send a message via Skype™ to nikusha774
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 07-22-2015 , 16:54   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #33

Quote:
Originally Posted by nikusha774 View Post
when any player join server stop working please fix it
Show him the errors, for fix it
__________________
Perfect Scrash is offline
Send a message via Skype™ to Perfect Scrash
PyPKjE20
Member
Join Date: Dec 2010
Location: Lithuania
Old 07-22-2015 , 20:39   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #34

Cool very good work! Everything works great for Who wants to try the Surf + DBZ mod IP: cs.slimi.lt
__________________

CS:GO Open Chest MOD IP: csgo.slimi.lt
New CS 1.6 CSGO IP: pub.slimi.lt
CS 1.6 Slimi RPG MOD http://rpg.slimi.lt
PyPKjE20 is offline
Send a message via Skype™ to PyPKjE20
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-23-2015 , 08:26   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #35

+Karma
Dragon Ball <3
__________________
Moroccan and proud
Linkin Hisoka is offline
wOOw
Member
Join Date: Jul 2015
Location: Lithuania
Old 08-29-2015 , 17:22   Re: Dragon Ball Z Mod 1.3 [Heroes vs Villains] (24 june 2015)
Reply With Quote #36

Some ideas:
1. Add level system. When player levelups he gets technique points and can spend them on increasing tehnique power ( damage ), max hp, power regeneration rate, power capacity.
2. So that you could select which tehnique you want to cast ( E ) and it would require some sort of bind ( bind c +technique / bind c + spell ...) or not.
3. Auto respawn.
4. Flying if possible.

Last edited by wOOw; 08-29-2015 at 17:27.
wOOw is offline
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 01-21-2016 , 13:38   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #37

Plugin Updated 21/01/2016

v 1.4:
* Fixed Sounds
* Use button in FM_emitsound
* Fixed Some bugs
* Added Join Spec Option
* Added More Superbuu Models

~ In topic:
* New Video Demo Added:
__________________
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-21-2016 , 15:26   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #38

Hi, Nice mod yours.

I just upgrade mime version to 1.4 and notice that I use the main HUD message position a little bit difference than the original, so, could you let it available using a '#define'?

I made it for you. I attached it. Here you can see exactly what I changed.

Now, what do you think about this code below you use inside 'printcolor':
Code:
    new g_msgsaytext         if(!g_msgsaytext) {         g_msgsaytext = get_user_msgid("SayText")     }
The variable g_msgsaytext will always be 0, to work as I think you thought, you should declare is as static. But in such case would be better to put it straight at global scope, and initialize it at plugin_cfg(). So you can save that 'if(!g_msgsaytext)' all the times the 'printcolor' is called.
Attached Files
File Type: sma Get Plugin or Get Source (dragon_ball_mod.sma - 537 views - 102.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-21-2016 at 22:51. Reason: spelling fix
addons_zz is offline
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 01-22-2016 , 10:38   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #39

Before I update the plugin see if it has anything to improve this code.
Attached Files
File Type: sma Get Plugin or Get Source (dragon_ball_mod.sma - 498 views - 102.2 KB)
__________________
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-23-2016 , 00:25   Re: Dragon Ball Z Mod 1.4 [Heroes vs Villains] (21 january 2016)
Reply With Quote #40

Quote:
Originally Posted by Perfect Scrash View Post
Before I update the plugin see if it has anything to improve this code.
Hi, I wrote too much I think, may be some good stuff, may be some bad ones. So, let us see what do you think about them. You can see here on red highlighted some of my coding style, if you like it.
    • At 'public fwd_PlayerSpawn(id)' you remove the task 'id+TASK_LOOP' and at 'public give_itens(id)' which is called right after, you removed it again, and right after create it.
    • A zero thought: Then, at 'if(!is_user_alive(id)) return;' on 'public dbz_loop(id)' function, remove the task instead of just return.
    • At 'remove_task(id+TASK_LOOP)' you wrote '// If they change the value of the cvar energy per second', and right after create the task again, but there no relation on doing that with re-creating a task again. Whatever, that is the task to remove, as we do not need a new one because we can just re-use that one created when the player connect.

    • A first thought: At 'public fwd_PlayerSpawn(id)', 'public choose_hero_handler( id, menu, item )', 'public choose_vilain_handler( id, menu, item )', and 'public give_itens(id)', there is not need to remove it again, because: a) if the player dies, it will be removed. b) if the player do not die, there is not need to remove.
    • A second thought: However I noticed that you create another task that is executed every 1 second too. That task is created when the player connect and removed when its disconnects. Hence, as task operations are expensive operations, can remove the task you create at 'public give_itens(id)', and call 'public dbz_loop(id)' at the beginning of the task you create when the client connect. But now at 'public ShowHUD(taskid)' we need to check if the client is at bot, right after call 'public dbz_loop(id)'.
    • A third thought: 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.

  1. Use a 'switch(cs_get_user_team(id))' at 'public ShowHUD(taskid)', on those ifs 'if(cs_get_user_team(id) == CS_TEAM_T)...' because a switch is faster then ifs and that operation is executed every second, then is good to save some cycles.

  2. At 'public give_itens(id)' you use 'give_item(id, "weapon_knife"); // Knifes Only', but prefer use the natives instead your own stocks because as the AMXX upgrade, they upgrade also, so you do not need to change your code and as they are written on native c++, they should be faster. If you need to filter some weapons or anything, so just create a interface as 'my_give_item', than apply your filters and then call the native 'give_item' when it is done filtering. The same to 'stock fm_strip_user_weapons(index)', 'stock set_user_health(index, health)'.

  3. At 'set_task( random_float( 5.0, 20.0 ), "use_power", id, _, _, "b" ) // For Bots use the Powers', what do you think about a higher time range, so they can give also powerful attacks? Maybe new cvars like minimum and maximum time.

  4. You removed these tasks at client put in server 'remove_task(id), remove_task(id+TASK_LOOP), remove_task(id+TASK_SHOWHUD)', but you also remove then at client disconnect. Since I know, a client cannot connect without disconnect first, then just removed then at client disconnect.

  5. On 'new name[ 32 ]; get_user_name( id, name, 31 )', 'entity_get_string( pToucher, EV_SZ_classname, szClassName, 31 )', 'new sName[ 32 ]; get_user_name( id, sName, 31 )', 'menu_item_getinfo( menu, item, access, data, 5, iName, 63, callback )', 'static msg[ 191 ]', 'replace_all( msg, 190, "!g", "^4" )', 'replace_all( msg, 190, "!y", "^1" )', 'replace_all( msg, 190, "!t", "^3" )', do not hard code the string size, use charsmax( string_name ).

  6. At 'if( !is_user_alive( vic ) || cs_get_user_team( id ) == cs_get_user_team( vic ) )', use a pcvar for the mp_friendlyfire to allow team damage when friendlyfire is enabled.

  7. At 'client_printcolor', register/use a register_colored_dictionary, which loads the LANG constants from the file replacing the '!g', '!y', '!t' with '^4', '^1', '^2' on server load, instead of every time you print a colored text. So, now while coloring inside your plugin use: '^4', '^1', '^2'.

  8. At 'public plugin_precache()', you let the poor pity sounds and sprites being hardcoded, instead of write their names only once, and latter access them as you do with the models. To write their names only once is good because it avoids/lets you changing/modifying they at one place and forgetting to do/changing it on the others they are used.

  9. At 'public plugin_init()' you cache 'g_msg_syc = CreateHudSyncObj()', 'g_maxpl = get_maxplayers()', but do not cache 'g_msgsaytext = get_user_msgid( "SayText" )' then you keep executing that 'if( !g_msgsaytext )' on 'stock client_printcolor( const id, const input[], any: ... )'. You can protect it also at 'public plugin_init()', using the same protection as '#if AMXX_VERSION_NUM < 183', which you use at 'stock client_printcolor( const id, const input[], any: ... )' for Amx Mod X 182 compatibility.

  10. By your 'public event_CurWeapon( id )', see this about CurWeapon Event and what do you think about that.

  11. At 'public use_power( id )', on 'if( !is_user_connected( id ) || !is_user_alive( id ) )', if the user is alive, it is not connect. The 'is_user_alive' already verify if the user is connected. See the function is_user_connected and is_user_alive implementations.
__________________
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-28-2016 at 22:15. Reason: spelling fix
addons_zz 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 13:32.


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