20.03.2010, 07:24
Code:
stock DeathCamera(playerid) { new Float:X, Float:Y, Float:Z, Float:X2, Float:Y2; GetPlayerPos(playerid, X, Y, Z); GetXYInFrontOfPlayer(playerid, X, Y, 1.000); GetXYInFrontOfPlayer(playerid, X2, Y2, 0.999); if(GetPlayerInterior(playerid) == 0) { SetPlayerCameraPos(playerid, X2, Y2, Z + 7.5); } else { SetPlayerCameraPos(playerid, X2, Y2, Z + 2.5); } SetPlayerCameraLookAt(playerid, X, Y, Z); } stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); if(GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } GetPlayerFacingAngle(playerid, a); x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); }