Quantcast

Jump to content

» «
Photo

Custom camera

2 replies to this topic
Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#1

Posted 18 May 2016 - 11:32 AM

Hello, I'm back after a long long time.

 

Is it possible to create a custom camera, for example a security camera, like this:

 

http://images-cdn.mo...-pri-570646.jpg

 

Thanks in advance.


Jitnaught
  • Jitnaught

    Grass tastes bad

  • Members
  • Joined: 24 Aug 2013
  • United-States

#2

Posted 18 May 2016 - 02:13 PM Edited by Jitnaught, 18 May 2016 - 02:14 PM.

To create a camera use these natives:

Cam CREATE_CAM_WITH_PARAMS(char *camName, float posX, float posY, float posZ, float rotX,float rotY, float rotZ, float fov, BOOL p8, int p9)
void SET_CAM_ACTIVE(Any cam, BOOL active)

For the rectangles use this native:

void DRAW_RECT(float x, float y, float width, float height, int r, int g, int b, int a)

For the text use these natives:

UI::SET_TEXT_FONT(int font);
UI::SET_TEXT_SCALE(0.0, scale);
UI::SET_TEXT_COLOUR(r, g, b, a);
UI::SET_TEXT_CENTRE(bool align);
UI::SET_TEXT_DROPSHADOW(distance, r, g, b, a);
UI::SET_TEXT_EDGE(Hash p0, r, g, b, a);
UI::_SET_TEXT_ENTRY("STRING");
UI::_ADD_TEXT_COMPONENT_STRING(stringToDisplay);
UI::_DRAW_TEXT(x, y);

Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#3

Posted 20 May 2016 - 11:34 AM

 

To create a camera use these natives:

Cam CREATE_CAM_WITH_PARAMS(char *camName, float posX, float posY, float posZ, float rotX,float rotY, float rotZ, float fov, BOOL p8, int p9)
void SET_CAM_ACTIVE(Any cam, BOOL active)

For the rectangles use this native:

void DRAW_RECT(float x, float y, float width, float height, int r, int g, int b, int a)

For the text use these natives:

UI::SET_TEXT_FONT(int font);
UI::SET_TEXT_SCALE(0.0, scale);
UI::SET_TEXT_COLOUR(r, g, b, a);
UI::SET_TEXT_CENTRE(bool align);
UI::SET_TEXT_DROPSHADOW(distance, r, g, b, a);
UI::SET_TEXT_EDGE(Hash p0, r, g, b, a);
UI::_SET_TEXT_ENTRY("STRING");
UI::_ADD_TEXT_COMPONENT_STRING(stringToDisplay);
UI::_DRAW_TEXT(x, y);

 

Thanks! Will take a look into it

  • Jitnaught likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users