Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Addon: Human Classes - Now with model change support - UPDATE


Post New Thread Reply   
 
Thread Tools Display Modes
nicocabot
Junior Member
Join Date: Aug 2009
Old 12-17-2010 , 21:45   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #151

the server keeps crashing
nicocabot is offline
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 12-19-2010 , 08:04   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #152

Quote:
Originally Posted by nicocabot View Post
the server keeps crashing
Remove blaster class, until i fix him

UPDATE:

New classes added, check first post
__________________
fiendshard is offline
Krevedko
Junior Member
Join Date: Jun 2010
Old 12-19-2010 , 09:20   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #153

fiendshard,
When you do this
Quote:
Make user choice remember thru whole map time, just like it was done for zombies
? Plugin is really very nice
Krevedko is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 12-19-2010 , 11:16   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #154

How to make a class to be accessible only to admins?

Thanks for help.
rodrigo286 is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-19-2010 , 14:01   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #155

Hey, Fiendshard, there a lot of optimizations which you can do to make your plugin much better
1- Instead of creating this menu again and again:
Code:
    new menu = menu_create("\yChoose Your Human Class:", "human_menu_handler")         menu_additem(menu, "\wArmorer \y(+20 Armor)", "1", 0)     menu_additem(menu, "\wPounder \y(+300 HP)", "2", 0)     menu_additem(menu, "\wJumper \y(High Jump)", "3", 0)     menu_additem(menu, "\wLeaper \y(Can Leap)", "4", 0)     menu_additem(menu, "\wRunner \y(Fast Movement)", "5", 0)     menu_additem(menu, "\wStealth Warrior \y(+Stealth)", "6", 0)     menu_additem(menu, "\wFrost Soldier \y(FrostNade X5)", "7", 0)     menu_additem(menu, "\wThief \y(Steals AP On Inf)", "8", 0)     menu_additem(menu, "\wBlinder \y(+FB On Inf)", "9", 0)     menu_additem(menu, "\wDoc \y(+500 HP On Inf)", "10", 0)     menu_additem(menu, "\wWicked One \y(+Madness On Inf)", "11", 0)     menu_additem(menu, "\wFeatherFoot \y(No Fall Damage)", "12", 0)     menu_additem(menu, "\wArmored Later \y(+Armor On Inf)", "13", 0)     menu_additem(menu, "\wLight Handler \y(Flare X5 & Light Aura)", "14", 0)        menu_additem(menu, "\wShotgunner \y(+Shotguns)", "15", 0)     menu_additem(menu, "\wSubMachine Kid \y(+SMG's)", "16", 0)     menu_additem(menu, "\wPhalanxer \y(Shield&Deagle)", "17", 0)     menu_additem(menu, "\wSharpshooter \y(No Recoil)", "18", 0)     menu_additem(menu, "\wLaser Aimer \y(Laser Sight)", "19", 0)     menu_additem(menu, "\wZombie Seeker \y(Zombie Radar)", "20", 0)     menu_additem(menu, "\wFirebat \y(NapalmNade X5)", "21", 0)             menu_additem(menu, "\wMan Of Despair \y(+10% Damage)", "22", 0)     menu_additem(menu, "\wBlaster \y(C4 Mine)", "23", 0)     menu_additem(menu, "\wMedic \y(1 Extra Antidote)", "24", 0)     menu_additem(menu, "\wPistolero \y(+All Guns)", "25", 0)     menu_additem(menu, "\wSamurai \y(Fast Knife + Dmg)", "26", 0)     menu_additem(menu, "\wTremor Maker \y(Shaking Screen)", "27", 0)     menu_additem(menu, "\wDeceiver \y(Bliniding Zombies)", "28", 0)             menu_additem(menu, "\wMutant \y(Nemesis On Inf)", "29", 0)     menu_additem(menu, "\wSpy \y(Intel Gathering)", "30", 0)     menu_additem(menu, "\wTough Guy \y(+M249 Para)", "31", 0)     menu_additem(menu, "\wSeer \y(+NightVision)", "32", 0)     menu_additem(menu, "\wLast Man \y(Survivor If Last)", "33", 0)     menu_additem(menu, "\wSlapper \y(Slaps Zombies)", "34", 0)     menu_additem(menu, "\wPogo Jumper \y(Pogo Weapons)", "35", 0)             menu_additem(menu, "\wCameraman \y(3rd Person Cam)", "36", 0)     menu_additem(menu, "\wGhost Stalker \y(+No Clip On Inf)", "37", 0)     menu_additem(menu, "\wSniper \y(+Snipers & Damage)", "38", 0)     menu_additem(menu, "\wDisemboweler \y(Explo Zombies)", "39", 0)     menu_additem(menu, "\wLeecher \y(Steals HP)", "40", 0)     menu_additem(menu, "\wHacker \y(Ejects CD)", "41", 0)     menu_additem(menu, "\wWiseman \y(HS Inf Only)", "42", 0)         menu_additem(menu, "\wKnockBacker \y(+Knockback)", "43", 0)     menu_additem(menu, "\wCollector \y(Multi Weapons)", "44", 0)     menu_additem(menu, "\wAurelius \y(Slow Aura)", "45", 0)     menu_additem(menu, "\wStealth Giver \y(Stealth Aura)", "46", 0)     menu_additem(menu, "\wNeutralizer \y(Disabling Inf Nades)", "47", 0)     menu_additem(menu, "\wSmoker \y(+SG On Inf)", "48", 0)     menu_additem(menu, "\wGambler \y(Random Class)", "51", 0)
You can create the menu in the plugin init and store its menu id in a global var and then when a player wants to use the menu then you can display it to him by using
Code:
 menu_display( player_id, 0, g_iMenuID )
2- Instead of checking this:
Code:
if(zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id)) return PLUGIN_HANDLED;
in every case of the switch statement which you use in the menu_handler, you can simply check it when the menu_handler function is called:
Code:
public human_menu_handler(id, menu, item) {     if( item == MENU_EXIT || zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id))     {         menu_destroy(menu)         return PLUGIN_HANDLED     }
3- Instead of using so many vars for human classes:
Code:
new bool:g_flare[33] new bool:g_fire[33] new bool:g_frost[33] new bool:g_jumper[33] new bool:g_phalanx[33] new bool:g_armor[33] new bool:g_pound[33] new bool:g_stealth[33] new bool:g_norecoil[33] new bool:g_nofalldamage[33] new bool:g_speed[33] new bool:g_laser[33] new bool:g_leap[33] new bool:g_radar[33] new bool:g_doc[33] new bool:g_shg[33] new bool:g_smg[33] new bool:g_blinder[33] new bool:g_mad[33] new bool:g_aps[33] new bool:g_az[33] new bool:g_dmgx[33] new bool:g_blaster[33] new bool:g_medic[33] new bool:g_gunner[33] new bool:g_samurai[33] new bool:g_tremor[33] new bool:g_flasher[33] new bool:g_mutant[33] new bool:g_spy[33] new bool:g_heavy[33] new bool:g_nvg[33] new bool:g_srv[33] new bool:g_dis[33] new bool:g_pogo[33] new bool:g_cam[33] new bool:g_ghost[33] new bool:g_snip[33] new bool:g_gore[33] new bool:g_leech[33] new bool:g_cd[33] new bool:g_head[33] new bool:g_knock[33] new bool:g_collector[33] new bool:g_aurel[33] new bool:g_sthg[33] new bool:g_neut[33] new bool:g_smoker[33]
You can simply use 1 variable to hold each players human class index like ZP does for holding gamemode's index's ( MODE_INFECTION, MODE_NEMESIS eg.)
Like this:
Code:
// .. new g_iPlayersClass[33] // .. enum {     NO_CLASS = 0,     CLASS_FLARE,     CLASS_FIRE,     CLASS_FROST,         // .. and then do it for other classes } // And then you can assign each players class g_iPlayersClass[ iPlayerID ] = CLASS_FLARE // Player haves Flare class

This way you can optimized this function as well:
Code:
public NewRound() {     for (new i = 1; i <= 32; i++)     {         g_iPlayerClass[ i ] = NO_CLASS     } }


There are also few optimizations you can make so your plugin will be smooth but right now i dont have the time to point out those
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 12-19-2010 , 15:40   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #156

Quote:
Originally Posted by abdul-rehman View Post
Hey, Fiendshard, there a lot of optimizations which you can do to make your plugin much better
1- Instead of creating this menu again and again:
Code:
    new menu = menu_create("\yChoose Your Human Class:", "human_menu_handler")         menu_additem(menu, "\wArmorer \y(+20 Armor)", "1", 0)     menu_additem(menu, "\wPounder \y(+300 HP)", "2", 0)     menu_additem(menu, "\wJumper \y(High Jump)", "3", 0)     menu_additem(menu, "\wLeaper \y(Can Leap)", "4", 0)     menu_additem(menu, "\wRunner \y(Fast Movement)", "5", 0)     menu_additem(menu, "\wStealth Warrior \y(+Stealth)", "6", 0)     menu_additem(menu, "\wFrost Soldier \y(FrostNade X5)", "7", 0)     menu_additem(menu, "\wThief \y(Steals AP On Inf)", "8", 0)     menu_additem(menu, "\wBlinder \y(+FB On Inf)", "9", 0)     menu_additem(menu, "\wDoc \y(+500 HP On Inf)", "10", 0)     menu_additem(menu, "\wWicked One \y(+Madness On Inf)", "11", 0)     menu_additem(menu, "\wFeatherFoot \y(No Fall Damage)", "12", 0)     menu_additem(menu, "\wArmored Later \y(+Armor On Inf)", "13", 0)     menu_additem(menu, "\wLight Handler \y(Flare X5 & Light Aura)", "14", 0)        menu_additem(menu, "\wShotgunner \y(+Shotguns)", "15", 0)     menu_additem(menu, "\wSubMachine Kid \y(+SMG's)", "16", 0)     menu_additem(menu, "\wPhalanxer \y(Shield&Deagle)", "17", 0)     menu_additem(menu, "\wSharpshooter \y(No Recoil)", "18", 0)     menu_additem(menu, "\wLaser Aimer \y(Laser Sight)", "19", 0)     menu_additem(menu, "\wZombie Seeker \y(Zombie Radar)", "20", 0)     menu_additem(menu, "\wFirebat \y(NapalmNade X5)", "21", 0)             menu_additem(menu, "\wMan Of Despair \y(+10% Damage)", "22", 0)     menu_additem(menu, "\wBlaster \y(C4 Mine)", "23", 0)     menu_additem(menu, "\wMedic \y(1 Extra Antidote)", "24", 0)     menu_additem(menu, "\wPistolero \y(+All Guns)", "25", 0)     menu_additem(menu, "\wSamurai \y(Fast Knife + Dmg)", "26", 0)     menu_additem(menu, "\wTremor Maker \y(Shaking Screen)", "27", 0)     menu_additem(menu, "\wDeceiver \y(Bliniding Zombies)", "28", 0)             menu_additem(menu, "\wMutant \y(Nemesis On Inf)", "29", 0)     menu_additem(menu, "\wSpy \y(Intel Gathering)", "30", 0)     menu_additem(menu, "\wTough Guy \y(+M249 Para)", "31", 0)     menu_additem(menu, "\wSeer \y(+NightVision)", "32", 0)     menu_additem(menu, "\wLast Man \y(Survivor If Last)", "33", 0)     menu_additem(menu, "\wSlapper \y(Slaps Zombies)", "34", 0)     menu_additem(menu, "\wPogo Jumper \y(Pogo Weapons)", "35", 0)             menu_additem(menu, "\wCameraman \y(3rd Person Cam)", "36", 0)     menu_additem(menu, "\wGhost Stalker \y(+No Clip On Inf)", "37", 0)     menu_additem(menu, "\wSniper \y(+Snipers & Damage)", "38", 0)     menu_additem(menu, "\wDisemboweler \y(Explo Zombies)", "39", 0)     menu_additem(menu, "\wLeecher \y(Steals HP)", "40", 0)     menu_additem(menu, "\wHacker \y(Ejects CD)", "41", 0)     menu_additem(menu, "\wWiseman \y(HS Inf Only)", "42", 0)         menu_additem(menu, "\wKnockBacker \y(+Knockback)", "43", 0)     menu_additem(menu, "\wCollector \y(Multi Weapons)", "44", 0)     menu_additem(menu, "\wAurelius \y(Slow Aura)", "45", 0)     menu_additem(menu, "\wStealth Giver \y(Stealth Aura)", "46", 0)     menu_additem(menu, "\wNeutralizer \y(Disabling Inf Nades)", "47", 0)     menu_additem(menu, "\wSmoker \y(+SG On Inf)", "48", 0)     menu_additem(menu, "\wGambler \y(Random Class)", "51", 0)
You can create the menu in the plugin init and store its menu id in a global var and then when a player wants to use the menu then you can display it to him by using
Code:
 menu_display( player_id, 0, g_iMenuID )
2- Instead of checking this:
Code:
if(zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id)) return PLUGIN_HANDLED;
in every case of the switch statement which you use in the menu_handler, you can simply check it when the menu_handler function is called:
Code:
public human_menu_handler(id, menu, item) {     if( item == MENU_EXIT || zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_nemesis(id))     {         menu_destroy(menu)         return PLUGIN_HANDLED     }
3- Instead of using so many vars for human classes:
Code:
new bool:g_flare[33] new bool:g_fire[33] new bool:g_frost[33] new bool:g_jumper[33] new bool:g_phalanx[33] new bool:g_armor[33] new bool:g_pound[33] new bool:g_stealth[33] new bool:g_norecoil[33] new bool:g_nofalldamage[33] new bool:g_speed[33] new bool:g_laser[33] new bool:g_leap[33] new bool:g_radar[33] new bool:g_doc[33] new bool:g_shg[33] new bool:g_smg[33] new bool:g_blinder[33] new bool:g_mad[33] new bool:g_aps[33] new bool:g_az[33] new bool:g_dmgx[33] new bool:g_blaster[33] new bool:g_medic[33] new bool:g_gunner[33] new bool:g_samurai[33] new bool:g_tremor[33] new bool:g_flasher[33] new bool:g_mutant[33] new bool:g_spy[33] new bool:g_heavy[33] new bool:g_nvg[33] new bool:g_srv[33] new bool:g_dis[33] new bool:g_pogo[33] new bool:g_cam[33] new bool:g_ghost[33] new bool:g_snip[33] new bool:g_gore[33] new bool:g_leech[33] new bool:g_cd[33] new bool:g_head[33] new bool:g_knock[33] new bool:g_collector[33] new bool:g_aurel[33] new bool:g_sthg[33] new bool:g_neut[33] new bool:g_smoker[33]
You can simply use 1 variable to hold each players human class index like ZP does for holding gamemode's index's ( MODE_INFECTION, MODE_NEMESIS eg.)
Like this:
Code:
// .. new g_iPlayersClass[33] // .. enum {     NO_CLASS = 0,     CLASS_FLARE,     CLASS_FIRE,     CLASS_FROST,         // .. and then do it for other classes } // And then you can assign each players class g_iPlayersClass[ iPlayerID ] = CLASS_FLARE // Player haves Flare class

This way you can optimized this function as well:
Code:
public NewRound() {     for (new i = 1; i <= 32; i++)     {         g_iPlayerClass[ i ] = NO_CLASS     } }


There are also few optimizations you can make so your plugin will be smooth but right now i dont have the time to point out those
thank you for optimization tips, will do it
__________________
fiendshard is offline
(--eRRoR--)
Senior Member
Join Date: Mar 2008
Location: Romania
Old 12-20-2010 , 19:16   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #157

can u make the classes integrate autmaticallu in the zp menu? after the change zombie selection?
__________________
All good coders who want to help us finish the uwc3x mode are expected here.
(--eRRoR--) is offline
Send a message via Yahoo to (--eRRoR--) Send a message via Skype™ to (--eRRoR--)
nicocabot
Junior Member
Join Date: Aug 2009
Old 12-20-2010 , 23:46   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #158

still crashing,
from the errorlogfiles
L 12/21/2010 - 01:08:57: [AMXX] Run time error 4 (plugin "zp_hclass.amxx") - debug not enabled!
nicocabot is offline
Beznicis
New Member
Join Date: Nov 2010
Old 12-21-2010 , 00:05   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #159

Too much
Beznicis is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-21-2010 , 01:51   Re: [ZP] Addon: Human Classes - Now with model change support - UPDATE
Reply With Quote #160

Quote:
Originally Posted by nicocabot View Post
still crashing,
from the errorlogfiles
L 12/21/2010 - 01:08:57: [AMXX] Run time error 4 (plugin "zp_hclass.amxx") - debug not enabled!
Enable debug ..
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
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 08:55.


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