Help me thanks..
#1

Код:
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.
Reply
#2

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.
Reply
#3

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..
Reply
#4

Quote:
Originally Posted by Puff
Посмотреть сообщение
Код:
damagesystem.pwn(204) : error 017: undefined symbol "damageid"
Hmmm..
Oh nvm fixed it haha its damagedid not damageid
Reply
#5

Yeah that typo was my mistake , anyways, does it work?
Reply
#6

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
Yeah that typo was my mistake , anyways, does it work?
Yes it does
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)