12.07.2011, 23:08
Did I helped you before in this Thread?
OH! I know what did you change!
EDIT: Added a quick filterscript.
OH! I know what did you change!
pawn Код:
#include < a_samp >
#include < foreach >
new
pUpdateTimer[ MAX_PLAYERS ]
;
public OnPlayerConnect( playerid ) {
pUpdateTimer[ playerid ] = SetTimerEx( "healMembers", 1000, true, "i", playerid );
return 1;
}
forward healMembers( playerid );
public healMembers( playerid )
{
if ( GetPlayerSkin( playerid ) == 287 )
{
new
Float: X, Float: Y, Float: Z, target = INVALID_PLAYER_ID;
GetPlayerPos( playerid, X, Y, Z );
foreach (Player, i)
{
if ( IsPlayerInRangeOfPoint( i, 2.0, X, Y, Z ) && i != playerid )
{
target = i;
}
}
if ( GetPlayerSkin( target ) == 287 )
{
new Float: pHealth;
GetPlayerHealth( target, pHealth );
if ( pHealth != 100.0 ) {
SetPlayerHealth( target, pHealth + 4.0 );
GameTextForPlayer( target, "~w~Being healed", 500, 3 );
}
}
}
return 1;
}