Quantcast

Jump to content

» «
Photo

[C#]Needing Assistance

1 reply to this topic
nmader
  • nmader

    Player Hater

  • Members
  • Joined: 23 Jul 2011

#1

Posted 19 July 2013 - 01:14 AM Edited by nmader, 19 July 2013 - 01:27 AM.

Alright, so I am rather new to coding GTA IV in general. (However I have previous C# experience). Basically I need to make these variables global (due to redefining them each time causes loads of unwanted issues):
CODE
Vector3 ped1Pos = Player.Character.Position.Around(200.0f);
           Vector3 ped2Pos = Player.Character.Position.Around(180.0f);
           Vector3 ped3Pos = Player.Character.Position.Around(160.0f);
           var Ped1 = World.CreatePed(ped1Pos, 0);
           var Ped2 = World.CreatePed(ped2Pos, 0);
           var Ped3 = World.CreatePed(ped3Pos, 0);
I am honestly quite stumped and any help would be greatly appreciated. confused.gif

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#2

Posted 22 July 2013 - 09:05 AM

What do you mean exactly by "make these variables global"?

You can declare the variables directly below the script scope, they will have reserved RAM space during the entire execution.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users