is this possible ?
#1

Is it possible that player don't get damage with sniper but gets damage with other weapons ?

http://*********/vVK2MLOSaGo
Reply
#2

If you mean can you do this with your script yes:

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

If you mean is this a valid hack, yes it is. The player can decide which weapon to have God Mode on.

Is it an SAMP Bug no.
Reply
#3

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
If you mean can you do this with your script yes:

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

If you mean is this a valid hack, yes it is. The player can decide which weapon to have God Mode on.

Is it an SAMP Bug no.
thanks buddy
Very informative
Reply
#4

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
If you mean can you do this with your script yes:

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

If you mean is this a valid hack, yes it is. The player can decide which weapon to have God Mode on.

Is it an SAMP Bug no.
That won't work correctly what happens if the player has 40 health and gets shots with sniper then that player would die so you can't just set the health back with that callback. It actually requires a skin hit system which should be used anyways since the stock lagcomp is junk.
Reply
#5


pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ)
{
if(hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID && weaponid == WEAPON_SNIPER)
{
if(SniperGod[playerid] == true) return 0;
}
return true;
}
This should work, although I could be wrong... The bullet should desync, - stopping any harm to the target player. Sorry for my bad indentation(I scripted it inside the reply box).
Reply
#6

Quote:
Originally Posted by Abagail
Посмотреть сообщение
I believe OnPlayerWeaponShot gets called before the player would die, how-ever I am not entirely sure. In that case, OnPlayerWeaponShot could be substitued. Example,

pawn Код:
public OnPlayerWeaponShot(....)
{
   if(hittype == BULLET_HIT_TYPE_PLAYER && hitid != INVALID_PLAYER_ID && weaponid == WEAPON_SNIPER)
{
if(SniperGod[playerid] == true) return 0;
}
return true;
}
Although I could be wrong about this, how-ever I am pretty sure this would work fine.
That could work but is probably not the ideal solution.
Reply
#7

That is true, how-ever it is ideal for someone who doesn't necessarily want to use a hit box system. It does it's basic purpose how-ever if you needed to a more effective solution could be thought of, but this should be sufficient.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)