Jump to content

Recommended Posts

Posted

Salutare la toata lumea, nu imi dau seama cum as putea face un mini sistem de camera de supraveghere!

Deci am gm roleplay si as vrea ca factiunea Politia Romana in sectie sa aiba acces la comanda /camera [1-5]

Si de exemplu sa dai /camera 1 si sa te puna aici
 

image.thumb.png.b11baf308bf9900a6af4100969c693c3.png
as vrea primul exemplu dupa care voi face eu

Posted (edited)
CMD:camera(playerid, params[])
{
	//check if player is a cop
	new camera;
	if(sscanf(params, "d", camera)) return SCM(playerid, -1, "Use:{FFFFFF} /camera [camera id] (1-5)");

	if(camera < 1 || camera > 5) return SCM(playerid, -1, "This camera id is invalid.");

	switch(camera)
	{
		case 1: {
			SetPlayerCameraPos(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
			SetPlayerCameraLookAt(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
		}
		case 2: {
			SetPlayerCameraPos(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
			SetPlayerCameraLookAt(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
		}
		case 3: {
			SetPlayerCameraPos(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
			SetPlayerCameraLookAt(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
		}
		case 4: {
			SetPlayerCameraPos(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
			SetPlayerCameraLookAt(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
		}
		case 5: {
			SetPlayerCameraPos(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
			SetPlayerCameraLookAt(playerid, COORDONATA_X, COORDONATA_Y, COORDONATA_Z);
		}
	}
	TogglePlayerSpectating(playerid, true);
	TogglePlayerControllable(playerid, false);
	return 1;
}

Pentru coordonatele de la camera poti folosi filterscript-ul CamEditor. 
Poti updata tu scriptul, precum, ai putea adauga o  verificare daca jucatorul se afla in modul spectate pentru ca verifica o camera, si sa faci o comanda noua /nextcam, sau poti adauga un textdraw pe ecran cu care poti schimba camera in momentul in care esti in procesul de verificare a camerei video. 

Edited by Maichh

Join the conversation

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

Guest
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.