Skip to content

Instantly share code, notes, and snippets.

@Whitetigerswt
Created February 22, 2015 18:54
Show Gist options
  • Save Whitetigerswt/7230f546cfd778566c8a to your computer and use it in GitHub Desktop.
Save Whitetigerswt/7230f546cfd778566c8a to your computer and use it in GitHub Desktop.
public OnPlayerUpdate(playerid)
{
new Float:posX, Float:posY, Float:posZ;
GetPlayerCameraPos(playerid, posX, posY, posZ);
if(!IsPlayerInRangeOfPoint(playerid, 10.0, posX, posY, posZ) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && (GetPlayerCameraMode(playerid) == 7 || GetPlayerCameraMode(playerid) == 53)) {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment