Help me thanks.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me thanks.. (
/showthread.php?tid=639856)
Help me thanks.. -
Puff - 24.08.2017
Код:
if(isInPaintball(playerid) || IsPlayerInEvent(playerid)) {
I want to use that code.. if player is in paintball or an event.. then this function TrytoApplyHurt don't work..
Код:
tryToApplyHurt(damagedid, wepid, Float:health, Float:armour) {
#pragma unused health
if(armour < 34.0) {
if(WeaponDamage[wepid][EDamageWeaponType] != EDamageType_Melee) {
setPlayerHurt(damagedid, wepid);
}
}
return 1;
}
or if in PVAR then
Код:
SetPVarInt(damagedid, "DownOnGround", 1);
this PVAR don't work if player is in paintball or event thanks.
Re: Help me thanks.. -
thegamer355 - 24.08.2017
pawn Код:
tryToApplyHurt(damagedid, wepid, Float:health, Float:armour) {
#pragma unused health
if(isInPaintball(damageid) || IsPlayerInEvent(damageid)) return 1;
if(armour < 34.0) {
if(WeaponDamage[wepid][EDamageWeaponType] != EDamageType_Melee) {
setPlayerHurt(damagedid, wepid);
}
}
return 1;
}
I've added:
pawn Код:
if(isInPaintball(damageid) || IsPlayerInEvent(damageid)) return 1;
Wich will prevent it from executing is one of these is true
That's pretty much it, i don't see a reason to use the PVar in here, might be me tho.
Re: Help me thanks.. -
Puff - 24.08.2017
Quote:
Originally Posted by thegamer355
pawn Код:
tryToApplyHurt(damagedid, wepid, Float:health, Float:armour) { #pragma unused health if(isInPaintball(damageid) || IsPlayerInEvent(damageid)) return 1; if(armour < 34.0) { if(WeaponDamage[wepid][EDamageWeaponType] != EDamageType_Melee) { setPlayerHurt(damagedid, wepid); } } return 1; }
I've added:
pawn Код:
if(isInPaintball(damageid) || IsPlayerInEvent(damageid)) return 1;
Wich will prevent it from executing is one of these is true
That's pretty much it, i don't see a reason to use the PVar in here, might be me tho.
|
Код:
damagesystem.pwn(204) : error 017: undefined symbol "damageid"
Hmmm..
Re: Help me thanks.. -
Puff - 24.08.2017
Quote:
Originally Posted by Puff
Код:
damagesystem.pwn(204) : error 017: undefined symbol "damageid"
Hmmm..
|
Oh nvm fixed it haha its damagedid not damageid
Re: Help me thanks.. -
thegamer355 - 24.08.2017
Yeah that typo was my mistake
, anyways, does it work?
Re: Help me thanks.. -
Puff - 30.08.2017
Quote:
Originally Posted by thegamer355
Yeah that typo was my mistake , anyways, does it work?
|
Yes it does