21.02.2012, 08:25
Hi, I made an auto-crack system but the camera moves to above the player, Can I change this without removing the TogglePlayerControllable
pawn Код:
forward checkcrack(playerid);
public checkcrack(playerid)
{
new Float:h;
GetPlayerHealth(playerid, h);
if(h < 20)
{
if(iscracked[playerid] == 0)
{
new Float:u, Float:u2, Float:u3;
GetPlayerPos(playerid, u, u2, u3);
iscracked[playerid] = 1;
TogglePlayerControllable(playerid, 0);
SetCameraBehindPlayer(playerid);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,0,1);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,1,0,0,120000,1);
cracktime[playerid] = SetTimerEx("uncrack", 120000, false, "i", playerid);
CrackLabel[playerid] = Create3DTextLabel("Injured", COLOR_RED, u, u2, u3, 15, 0);
}
}
return 1;
}