15.04.2017, 19:11
PHP код:
stock bool:IsPlayerFakeSpectating(playerid,bool:force_disable=true){
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && IsPlayerAdmin(playerid)) return false; //admins spectacing detect
if(GetPlayerCameraMode(playerid) != 4) return false;
new Float:px,Float:py,Float:pz,Float:cx,Float:cy,Float:cz;
GetPlayerPos(playerid,px,py,pz);
GetPlayerCameraPos(playerid,cx,cy,cz);
if(VectorSize(px-cx,py-cy,pz-cz) < 20.0) return false;
if(force_disable) SetCameraBehindPlayer(playerid);
return true;
}