Jump to content

Idee quest fotografii


Recommended Posts

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 by Akan
  • Like 2

! Akan !#6675

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.