04.04.2012, 09:30
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health-10);
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health-10);
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health - 2.2);
return 1;
}
Oh, Yes Without the snippet all works fine, Could u post a example if you know about "Lose health when crash" I mean I would like to synch the VehicleHealth with the PlayerHealth ...
|
public OnGameModeInit( )
{
SetTimer( "vSync", 1000, true );
return 1;
}
forward vSync( );
public vSync( )
{
for( new i; i < MAX_PLAYERS; i ++ )
{
new Float:HP;
GetVehicleHealth( GetPlayerVehicleID( i ), HP );
SetPlayerHealth( i, HP / 10 );
}
return 1;
}