07.04.2011, 22:21
Quote:
#include <j_fader_v2> |
Quote:
public OnGameModeInit() { FadeInit(); |
}
Quote:
public OnPlayerUpdate(playerid) { GetPlayerHealth(playerid,gTmp); if(pOldHealth[playerid]>gTmp) { FadeColorForPlayer(playerid,139,0,0,floatround(pOl dHealth[playerid]-gTmp)*10,139,0,0,0,floatround(pOldHealth[playerid]-gTmp),0); } pOldHealth[playerid]=gTmp; if(IsPlayerInAnyVehicle(playerid)) { GetVehicleVelocity(GetPlayerVehicleID(playerid),gt emp[0],gtemp[1],gtemp[2]); gtemp[3]=floatsqroot( floatmul(gtemp[0],gtemp[0])+floatmul(gtemp[1],gtemp[1])+floatmul(gtemp[2],gtemp[2]) )*100; if(vSpeed[playerid]-gtemp[3]>20)FadeColorForPlayer(playerid,139,0,0,(floatroun d(vSpeed[playerid]-gtemp[3])-20)*3,139,0,0,0,floatround(vSpeed[playerid]-gtemp[3])-20,0); vSpeed[playerid]=gtemp[3]; } return 1; } |