Neculai Posted May 30, 2021 Report Share Posted May 30, 2021 Salut, as vrea sa realizez un quest in care sa fotografiezi obiecte sau masini, insa nu cunosc o functie sa verifice cand jucatorul face poza. Aveti idee? Quote Link to comment Share on other sites More sharing options...
Akan Posted May 30, 2021 Report Share Posted May 30, 2021 (edited) Poti verifica la OnPlayerKeyStateChange daca jucatorul apasa click si daca are in mana aparatul de fotografiat si 'tinta' pusa, folosindu-te de GetPlayerWeapon si GetPlayerCameraMode, apoi verifici daca jucatorul respectiv se uita catre obiect, folosind GetPlayerCameraTargetObject. Iti las mai jos un mic exemplu ca sa intelegi cam cum se face: ('PhotoObj' fiind obiectul respectiv pe care trebuie sa il fotografiezi) if(newkeys & KEY_FIRE) { if(GetPlayerWeapon(playerid) == 43 && GetPlayerCameraMode(playerid) == 46) { if(GetPlayerCameraTargetObject(playerid) == PhotoObj) { GivePlayerCash(playerid, 1000000); SendClientMessage(playerid, -1, "[Photo Quest]: Ai primit $1,000,000 deoarece ai fotografiat un obiect!"); } } De asemenea, pentru ca functia GetPlayerCameraTargetObject sa functioneze, va trebui sa adaugi EnablePlayerCameraTarget(playerid, 1); la OnPlayerConnect. Edited May 30, 2021 by Akan 2 Quote Discord: ! Akan !#6675 Link to comment Share on other sites More sharing options...
Neculai Posted May 31, 2021 Author Report Share Posted May 31, 2021 Mersi mult! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.