Chainsaw System
#1

Hello guys! Well is something hard to be explained but i want to know how can i create that chainsaw system to get damage that easily. You can see the video and how easy his healths go down!

https://www.youtube.com/watch?v=gRQo...ature=*********

I really need to know this thanks
Reply
#2

Try this out.

Quote:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID) // If not self-inflicted
{
new
infoString[128],
weaponName[24],
victimName[MAX_PLAYER_NAME],
attackerName[MAX_PLAYER_NAME];

GetPlayerName(playerid, victimName, sizeof (victimName));
GetPlayerName(issuerid, attackerName, sizeof (attackerName));

GetWeaponName(weaponid, weaponName, sizeof (weaponName));

format(infoString, sizeof(infoString), "%s has made %.0f damage to %s, weapon: %s, bodypart: %d", attackerName, amount, victimName, weaponName, bodypart);
SendClientMessageToAll(-1, infoString);
}
return 1;
}

Reply
#3

Something like this will never fix that bug
Reply
#4

Quote:
Originally Posted by ItzColaBoi
Посмотреть сообщение
Try this out.
Did you even read what he said.

@On Topic
You can modify a weapon's damage by using weapon-config.inc https://sampforum.blast.hk/showthread.php?tid=563387
Reply
#5

Quote:
Originally Posted by coool
Посмотреть сообщение
Did you even read what he said.

@On Topic
You can modify a weapon's damage by using weapon-config.inc https://sampforum.blast.hk/showthread.php?tid=563387
Well i thought he wanted to change the amount of damage that chainsaw gives.
Reply
#6

HP usually goes down easily if you got hit by a chainsaw, But if you wanna change it, do like what Cool said. or make it using the gamemode.
Reply
#7

Chainsaw have something like a bug that doesent make damage. thats what i wanna fix . Like in video
Reply
#8

It looks like after there is chainsaw damage a timer is set to decrease hp at many intervals over a few seconds.
Reply
#9

It looks like regular damage, nothing different.

Quote:
Originally Posted by Pottus
Посмотреть сообщение
It looks like after there is chainsaw damage a timer is set to decrease hp at many intervals over a few seconds.
Not neccessarily.. Since the damage is synced by the Player with the Chainsaw (and the remote player will still perform Hit-Animations), the Security guy could've been stuck in the "hurt" Animation on the other end even though he was actually farther away.
This happens a lot, if you hit someone with Chainsaw they will most likely enter that Animation and appear "hovering", or even stopping for roughly 2 seconds (which would explain what happened here). If the Pings are high or the connection bad, you can easily kill players at 500 hp even though they are 5m away (lag spike is enough to get him stuck into the saw on your end).
Reply
#10

My guess is OnPlayerGiveDamage. He still takes damage even when the chainsaw guy is nowhere near him, meaning his health is being controlled by the server.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)