Quantcast

Jump to content

» «
Photo

Cords or position on screen

18 replies to this topic
Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#1

Posted 13 July 2014 - 04:19 PM

hey guys how can i get to know the position on screen 

(making a mod menu) :D

 

PLEASE NO OFF TOPIC!

 

Thank You!  :lol:


stef538
  • stef538

    It's just me, going 88 MPH.

  • Members
  • Joined: 06 Oct 2012
  • Netherlands

#2

Posted 13 July 2014 - 04:53 PM

this is like the easiest thing ever.. but here :

 

private Vector3 getheight;

getheight = Player.Character.Position.ToGround();
e.Graphics.DrawText(getheight.ToString(), 0, 0, System.Drawing.Color.White, font01); // or use game.displaytext
  • Jitnaught and Wiebrendh like this

Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#3

Posted 13 July 2014 - 05:11 PM

First: Make a PerFrameDrawing.
Second: Put this code in the PerFrameDrawing function:

e.Graphics.DrawText(Player.Character.Position.ToString(), 0, 0, Color.White); //Position, where to put text X, where to put text Y, what color to make the text

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#4

Posted 14 July 2014 - 01:44 AM

I know these things but how I get the values of x and y
Like we have a position in the city and can spawn. A specific object and stuff
Will explain it deeply later

Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#5

Posted 14 July 2014 - 01:52 AM

Vector3 positionOfWhatever;
//positionOfWhatever.X to get X
//positionOfWhatever.Y to get Y
//positionOfWhatever.Z to get Z

maro_hannover
  • maro_hannover

    Skilled Like A Rockstar

  • BUSTED!
  • Joined: 11 Jan 2013
  • Germany

#6

Posted 14 July 2014 - 01:55 AM

I don't understand exactly what are you asking can you re-explain?


Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#7

Posted 14 July 2014 - 05:39 AM

I don't understand exactly what are you asking can you re-explain?

He's asking for coorinates position on screen.

How hard is that?


byteMe420
  • byteMe420

    allah akbar!

  • BUSTED!
  • Joined: 02 Jul 2014
  • United-States

#8

Posted 14 July 2014 - 02:43 PM Edited by byteMe420, 14 July 2014 - 02:44 PM.

he wants to draw on screen using the world position?? if he goes back a few pages in the coding section there are threads about it


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#9

Posted 19 July 2014 - 03:31 PM

Rugz look at the source code of some of my mods that include menu's. Those are easy and effective ways to make menu's

NOLABaby8732
  • NOLABaby8732

    Player Hater

  • Members
  • Joined: 06 Feb 2012

#10

Posted 22 July 2014 - 06:58 PM

SCO Script..
 

void setUpDraw(float width, float height, uint r, uint g, uint b, uint a, bool isToggle, bool isNumber)
{
	SET_TEXT_FONT(0);
	SET_TEXT_BACKGROUND(0);
	SET_TEXT_DROPSHADOW(0, 0, 0, 0, 255);
	SET_TEXT_EDGE(1, 0, 0, 0, 255);

	SET_TEXT_COLOUR(r, g, b, a);
	SET_TEXT_SCALE(width, height);
	SET_TEXT_PROPORTIONAL(1);

	SET_TEXT_JUSTIFY(0);
	SET_TEXT_CENTRE(0);
	if (isToggle)
	{
		SET_TEXT_RIGHT_JUSTIFY(1);
		SET_TEXT_WRAP(0.0000, menuX + 0.2040);
	}
	else if (isNumber)
	{
		SET_TEXT_RIGHT_JUSTIFY(1);
		SET_TEXT_WRAP(0.0000, menuX + 0.1920);
	}
	else
	{
		SET_TEXT_RIGHT_JUSTIFY(0);
	}
	SET_TEXT_USE_UNDERSCORE(1);

}

GET_CHAR_COORDINATES(GetPlayerPed(), &fX, &fY, &fZ);
		GET_CHAR_HEADING(GetPlayerPed(), &tmpF);

		setUpDraw(0.30000000, 0.30000000, 255, 119, 0, 255, false, false);
		DISPLAY_TEXT_WITH_FLOAT(0.05000000, 0.10000000, "NUMBR", fX, 4);
		setUpDraw(0.30000000, 0.30000000, 255, 119, 0, 255, false, false);
		DISPLAY_TEXT_WITH_FLOAT(0.05000000, 0.13000000, "NUMBR", fY, 4);
		setUpDraw(0.30000000, 0.30000000, 255, 119, 0, 255, false, false);
		DISPLAY_TEXT_WITH_FLOAT(0.05000000, 0.16000000, "NUMBR", fZ, 4);
		setUpDraw(0.30000000, 0.30000000, 255, 119, 0, 255, false, false);
		DISPLAY_TEXT_WITH_FLOAT(0.05000000, 0.19000000, "NUMBR", tmpF, 4);
  • Rugz007 likes this

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#11

Posted 31 July 2014 - 05:27 AM

Rugz look at the source code of some of my mods that include menu's. Those are easy and effective ways to make menu's

dude i have seen them BUT i need the position near the radar :D  

does anyone knows it ? 


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#12

Posted 31 July 2014 - 11:09 AM

You change the X and Y positions in the DrawText function.

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#13

Posted 31 July 2014 - 01:57 PM

Dude can you give the values PLEASE?

Noox
  • Noox

    changeScriptAbility(&myScriptAbility, "improve");

  • Members
  • Joined: 20 Jun 2014
  • None

#14

Posted 31 July 2014 - 02:01 PM

The values change based on your aspect ratio and resolution, also don't ask him to do the job for you, you'll never learn.

You have to play with the values no human will ever know the exact position of something in a screen.


Wiebrendh
  • Wiebrendh

    C# Programmer

  • Members
  • Joined: 22 Mar 2014
  • Netherlands

#15

Posted 31 July 2014 - 05:56 PM

Well you did not look at nu source, that ibcludes screen pos under the radar..

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#16

Posted 01 August 2014 - 01:51 AM

Nu? What is it dude?

Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#17

Posted 01 August 2014 - 10:21 AM Edited by LetsPlayOrDy, 01 August 2014 - 10:22 AM.

It's a typo. He meant 'my'.

Rugz007
  • Rugz007

    A simple guy

  • Members
  • Joined: 19 Apr 2014
  • India

#18

Posted 01 August 2014 - 02:07 PM

Okay but which mod?
I think the painstillers?

Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

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

#19

Posted 01 August 2014 - 02:13 PM Edited by LetsPlayOrDy, 01 August 2014 - 02:13 PM.

Okay but which mod?
I think the painstillers?

Just look through all of his mods (from newest to oldest). That would take less time than it would to wait for Wiebrendh to reply





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users