[HELP] Bleeding system
#1

Hi , i wanna whene a player hit an other one , attach blood to hited player 3 or 6 times . how to do it thanks ?

NB : if you know a tutorial just give me it please .
Reply
#2

you mean this?
Код:
new oid[ 10 ]; 
public OnPlayerTakeDamage( playerid, issuerid, Float: amount, weaponid )
{
    new Float:P[3];

    GetPlayerPos(playerid, P[0], P[1], P[2]);
    new Float: hp ;
    GetPlayerHealth(playerid, hp), hp -= amount;
    if( amount >= 3  ) 
   {
     			oid [ 0 ] = CreateObject ( 18668 , P [ 0 ] , P [ 1 ], P [ 2 ], 0 , 0, 0, 25.0 ) ;
			oid [ 1 ] = CreateObject ( 18668 , P [ 0 ]+2 , P [ 1 ], P [ 2 ] , 0 , 0, 0, 25.0 ) ;
			oid [ 2 ] = CreateObject ( 18668 , P [ 0 ] , P [ 1 ]+2, P [ 2 ] , 0 , 0, 0, 25.0 ) ;
			oid [ 3 ] = CreateObject ( 18668 , P [ 0 ] , P [ 1 ], P [ 2 ]+2 , 0 , 0, 0, 25.0 ) ;
			oid [ 4 ] = CreateObject ( 18668 , P [ 0 ] , P [ 1 ], P [ 2 ]-2 , 0 , 0, 0, 25.0 ) ;
			oid [ 5 ] = CreateObject ( 18668 , P [ 0 ] , P [ 1 ]-2, P [ 2 ] , 0 , 0, 0, 25.0 ) ;
			oid [ 6 ] = CreateObject ( 18668 , P [ 0 ]-2 , P [ 1 ], P [ 2 ] , 0 , 0, 0, 25.0 ) ;
            SetTimerEx("DestroyObj",2000,false,"i",playerid);
    }
    return 1;
}
forward DestroyObj();
public DestroyObj()
{
for(new i; i < 7 ; i++)
{
DestroyObject(oid[i]);
}
return 1;
}
Reply
#3

can you explain to me the code ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)