can actors walk
#3

may i get an idea of how to do it i find nothing for actors

im also having another problem thats pissing me off

im gettin tag mismatch onplayergivedamageactor i just copied the code from samp wiki

Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
    new string[128], attacker[MAX_PLAYER_NAME];
    new weaponname[24];
    GetPlayerName(playerid, attacker, sizeof (attacker));
    GetWeaponName(weaponid, weaponname, sizeof (weaponname));
 
    format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname);
    SendClientMessageToAll(0xFFFFFFFF, string);
 
    if(!IsActorInvulnerable(damaged_actorid)) //Check if actor is vulnerable
    {
        new Float:health;
        GetActorHealth(damaged_actorid, health); //Get current health
        SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
    }
    return 1;
}
source of code: https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor

error and warnings

error 035: argument type mismatch (argument 2)
warning 213: tag mismatch
warning 213: tag mismatch

on these lines

GetActorHealth(damaged_actorid, health); //Get current health
SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health


what am i doing wrong i already got an actor in there
Reply


Messages In This Thread
can actors walk - by PSYCHOBABYKILLA - 07.05.2015, 23:29
Re: can actors walk - by Crayder - 07.05.2015, 23:39
Re: can actors walk - by PSYCHOBABYKILLA - 08.05.2015, 00:42
Re: can actors walk - by Crayder - 08.05.2015, 01:29
Re: can actors walk - by Emmet_ - 08.05.2015, 02:24
Re: can actors walk - by TakeiT - 08.05.2015, 02:38
Re: can actors walk - by PSYCHOBABYKILLA - 08.05.2015, 05:29
Re: can actors walk - by Crayder - 08.05.2015, 11:20
Re: can actors walk - by PSYCHOBABYKILLA - 08.05.2015, 13:38
Re: can actors walk - by [KHK]Khalid - 08.05.2015, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)