Raised This Month: $ Target: $400
 0% 

Solved Save/Get multiple different values in the same variable per player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sursista
Senior Member
Join Date: Jul 2010
Location: Spain
Old 02-18-2022 , 05:43   Re: Save/Get multiple different values in the same variable per player
Reply With Quote #1

Quote:
Originally Posted by fysiks View Post
Here are some thoughts:

If the victim dies, I don't see why you shouldn't be setting all 4 variables to zero. Also, having if statements for both "variable" and "not variable" is unnecessary, simply use an else condition, it will be more efficient.
Code:
	if(zp_core_is_zombie(victim))
	{
		g_count_victim_human[victim] = 0;
		g_fDamage_Human[victim][attacker] = 0.0;
	}
	
	if(!zp_core_is_zombie(victim))
	{
		g_count_victim_zombie[victim] = 0;
		g_fDamage_Zombie[victim][attacker] = 0.0;
	}
Making the code much simpler should make it easier to debug and determine what you might be doing wrong.
I will do a full debug of the plugin, it will take me some time
sursista is offline
Send a message via MSN to sursista Send a message via Skype™ to sursista
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:43.


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