21.04.2018, 10:42
how i can verify if a player is using camera, and is take photo on a object? sorry for my english.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(PRESSED(KEY_FIRE)) { if(GetPlayerCameraMode(playerid) == 46) { //The player has taken a photo } } return 1; }
if(GetPlayerCameraTargetObject(playerid) == /*objectid*/ && IsPlayerInRangeOfPoint(playerid, /*range, object posx, object posy, object posz*/)) { // then your code to see if they've taken a picture of that object and is in the range of that object you specified. }