[Include] weapon-config.inc - Damage system with many features

Health bar makes me annoying, Is there any way to remove it?
Reply

It's there because the other healthbar always has full health. If you remove it, you will never know your health.
Reply

Going to use it for my upcoming project. Thanks.
Reply

Quote:
Originally Posted by Slice
Посмотреть сообщение
It's there because the other healthbar always has full health. If you remove it, you will never know your health.
Ok thanks for let me know about that
Reply

Whenever I try to spawn, it's saying like that.

[08:45:04] (wc) InflictDamage(0, 0.0000, 65535, 55, 0) length = 0.000000
[08:45:04] (wc) OnPlayerDamageDone(65535 did 0.000000 to 0 with 55 on bodypart 0)

And killing me.
Reply

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
Whenever I try to spawn, it's saying like that.

[08:45:04] (wc) InflictDamage(0, 0.0000, 65535, 55, 0) length = 0.000000
[08:45:04] (wc) OnPlayerDamageDone(65535 did 0.000000 to 0 with 55 on bodypart 0)

And killing me.
Something is issuing you 0.000000 damage.
The system kill you if you get issued 0 or negative damage.
Reply

I have spawn protection(FLOAT_INFINITY), when player spawned. But I deleted it and test it nothing changed
Reply

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
I have spawn protection(FLOAT_INFINITY), when player spawned. But I deleted it and test it nothing changed
It looks like something is trying to issue you 0 damage.
If you do not want to receive damage (from something) you should
Код:
return 0;
instead of setting the value to zero.
Reply

Thanks, solved.
Reply

Shit, same problem. Sorry for double post. After 7 secs I spawn, set player health to 100 and this debug coming to me. I can give health with command but this way not working.

[12:57:51] (wc) InflictDamage(1, 0.0000, 65535, 55, 0) length = 0.000000
[12:57:51] (wc) OnPlayerDamageDone(65535 did 0.000000 to 1 with 55 on bodypart 0)
Reply

Show me what you do in code
Reply

I deleted the conditions, now works perfectly.
Reply

..which conditions?

If you modified the include, you will run into problems in some cases.
Reply

Quote:
Originally Posted by Slice
Посмотреть сообщение
..which conditions?

If you modified the include, you will run into problems in some cases.
Nope, not from include. It's working perfectly for now. You can test it.

IP: 149.202.98.247:7777

And here is the code that I modified.

PHP код:
                    new Float:get;
                    
SetPlayerHealthEx(playeridget);
                    new 
rank GetPlayerRank(playerid);
                    if (
get gRank[rank][rankHealth])
                    {
                        
SetPlayerHealth(playeridgRank[rank][rankHealth]);
                    }
                    
GetPlayerArmour(playeridget);
                    if (
get gRank[rank][rankArmour])
                    {
                        
SetPlayerArmour(playeridgRank[rank][rankArmour]);
                    } 
Reply

That code is not from weapon-config - I asked if you modified weapon-config.

Also, what is SetPlayerHealthEx and why do you set the player's health to 0? That kills the player.
Reply

Quote:
Originally Posted by Slice
Посмотреть сообщение
That code is not from weapon-config - I asked if you modified weapon-config.

Also, what is SetPlayerHealthEx and why do you set the player's health to 0? That kills the player.
Yeah, thats true. I've already told you I thought you did not see my previous post.

SetPlayerHealthEx is my old code. I was trying to server sided health system. Thats coming from here. For now no needed.
Reply

I got problem like that could anyone help me?

https://sampforum.blast.hk/showthread.php?tid=609685
Reply

I don't know if you are aware about this. I reported this on SFR forums once. The thing is that when you shoot a car without driver but with a passenger, vehicles with guns can't damage them as I show in this video.

https://www.youtube.com/watch?v=H3nkyjEZyTs
Reply

Quote:
Originally Posted by poxer
Посмотреть сообщение
I don't know if you are aware about this. I reported this on SFR forums once. The thing is that when you shoot a car without driver but with a passenger, vehicles with guns can't damage them as I show in this video.

https://www.youtube.com/watch?v=H3nkyjEZyTs
I do appreciate the detailed report, but unfortunately there is not much to be done about this currently.

There is no way to know that a rhino explosion happened near a car (at least not in a perfect way), and the same goes for seasparrow/rustler fire.

The reason for this is there are no OnPlayerWeaponShot messages sent to the server for these types of things, and no OnPlayerTake/GiveDamage.
Reply

Quote:
Originally Posted by poxer
Посмотреть сообщение
I don't know if you are aware about this. I reported this on SFR forums once. The thing is that when you shoot a car without driver but with a passenger, vehicles with guns can't damage them as I show in this video.

https://www.youtube.com/watch?v=H3nkyjEZyTs
If you got something like this:

Код:
public OnGameModeInit()
{
    EnableVehicleFriendlyFire();
    return 1;
}
Just delete it, your problem will be solved.
Reply


Forum Jump:


Users browsing this thread: 30 Guest(s)