News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: LUA Command  (Read 7045 times)

0 Members and 1 Guest are viewing this topic.

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: LUA Command
« Reply #15 on: December 11, 2013, 12:19:37 AM »
If you want full animation of them walking on their own to a specified destination you will need to add quite a bit more code to your script plus also load a couple animation groups as well since otherwise the ped will not do what is wanted. If c00ldoc can't help you with this just say something and I will see what I can do.

Kinda coding blind here since I don't exactly have bully installed atm so can't really test any code and am going solely from memory here so....hopefully I am correct and not mis-leading you in any way.

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: LUA Command
« Reply #16 on: December 11, 2013, 01:31:24 AM »
I can help him but I don't find the time.
I've been moving peds around nearly all parts of the map for anything from videos (for a few peds running scenes) to Mods like Russell Mod custom missions.
I don't find rhe time because school takes me a lot of time aswell I have to rewrite my last sub section in the Tables section in my LUA tutorial, keep my fans on YouTube entertained by uploading new videos every week and hang with friends from times to times.
Once I get the time I'll help.
But if u don't want to wait then Mad you can go ahead and take this quest on you mate :P

Offline Black Norton

  • Keep Calm
  • Jr. Member
  • **
  • Posts: 86
  • Gender: Male
  • Peace For Respect
    • View Profile
Re: LUA Command
« Reply #17 on: December 11, 2013, 06:13:44 AM »
I decided to take a look at your script there m8.

Quite a few problems from what I can see unless pasting it here messed something up.

First off...the syntax is all wrong since there is way too much whitespace in the code....this will cause some minor problems with the lua interpreter in following all of the code.

There are a few ways to force a ped to move to a set xyz coord of their own power but personally...it would be far easier to just spawn them directly at the coords you wish to be spawned and either spawn there on your own at the same time or just add some code to make them permanent with a marker on the map to lead you to them and to let you know they are still in the game unless knocked out or something.

PedMoveToXYZ is a code I never really bothered using since while it does work...it is kinda a problematic code at times and I have found far easier methods to achieve moving a ped around.

Here is a cleaned and properly formatted version of your script. I fixed a couple typos so...see if this works now since from what I can see your code is pretty much correct.


Code: [Select]
ImportScript("\\Library\\LibTable.lua") -- imports the LibTable library
ImportScript("\\Library\\LibPed.lua") -- imports the LibPed library
local l_0_0 = false

MissionSetup = function() -- basic mission setup function which is used in almost all bully scripts
local l_1_0 = 270 -- X coords
local l_1_1 = -110 -- Y coords
local l_1_2 = 6.4000000953674 -- Z coords
PlayerSetHealth(200) -- gives the player 200 health
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
Darby = PedCreateXYZ(37, l_1_0 + 1, l_1_1 + 1, l_1_2 + 1)
PedMoveToXYZ(Darby, 3, 515, 504, 19.60971009)
end

F_MissionSetup = function()
ClockSet(9, 30)
ClockSetTickRate(0.0060000000521541)
end

MissionCleanup = function()
end -- end statement

main = function() -- Main mission function
F_MissionSetup()
gMissionRunning = false
while gMissionRunning do
if PedGetHealth(gplayer, 200) < 200 then
PedSetHealth(gplayer,200)
repeat
Wait(0)
until l_0_0 ~= false
MissionSucceed()
end
Wait(0)
end
end
If you want full animation of them walking on their own to a specified destination you will need to add quite a bit more code to your script plus also load a couple animation groups as well since otherwise the ped will not do what is wanted. If c00ldoc can't help you with this just say something and I will see what I can do.

Kinda coding blind here since I don't exactly have bully installed atm so can't really test any code and am going solely from memory here so....hopefully I am correct and not mis-leading you in any way.

sorry mad but the script isn't work
Darby only stand and i don't know what the problem  :wacko:  :ohmy:

I can help him but I don't find the time.
I've been moving peds around nearly all parts of the map for anything from videos (for a few peds running scenes) to Mods like Russell Mod custom missions.
I don't find rhe time because school takes me a lot of time aswell I have to rewrite my last sub section in the Tables section in my LUA tutorial, keep my fans on YouTube entertained by uploading new videos every week and hang with friends from times to times.
Once I get the time I'll help.
But if u don't want to wait then Mad you can go ahead and take this quest on you mate :P
if you're busy no problem dude  :)
you can help if you have the time :D

Offline Black Norton

  • Keep Calm
  • Jr. Member
  • **
  • Posts: 86
  • Gender: Male
  • Peace For Respect
    • View Profile
Re: LUA Command
« Reply #18 on: December 20, 2013, 09:00:28 AM »
Huh??
help me dude  :o :ohmy:

Offline MadmaN

  • Bully-Board Admin Team
  • Newbie
  • *
  • Posts: 0
  • Gender: Male
  • Biblio-Techa Mods (retired)
    • View Profile
Re: LUA Command
« Reply #19 on: December 20, 2013, 01:24:46 PM »
Sry I have not been able to reply back or do much more. Trying to concentrate fully on getting the player selector out for everyone by or before xmas and that has my full concentration atm.

Offline Black Norton

  • Keep Calm
  • Jr. Member
  • **
  • Posts: 86
  • Gender: Male
  • Peace For Respect
    • View Profile
Re: LUA Command
« Reply #20 on: December 23, 2013, 04:57:21 AM »
The player selctor??  :blink:

Offline Unknownsoldier

  • Hero Member
  • ****
  • Posts: 2,773
    • View Profile
Re: LUA Command
« Reply #21 on: July 04, 2014, 01:03:49 AM »
The player selctor??  :blink:
psm = CANCELLED MOD

Offline Bellic19

  • Sr. Member
  • ***
  • Posts: 933
  • Gender: Male
    • View Profile
Re: LUA Command
« Reply #22 on: July 04, 2014, 08:35:56 AM »
No unknown soldier it's not. Get your facts right. It's just renamed

Offline WhenLifeGivesYouLemons

  • xfire: 1emonthatsme
  • Sr. Member
  • ***
  • Posts: 971
  • Gender: Male
  • 波動バースト
    • View Profile
Re: LUA Command
« Reply #23 on: July 04, 2014, 08:50:14 AM »
No unknown soldier it's not. Get your facts right. It's just renamed
He heard it on swegta/c00ld0c stream yesterday

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: LUA Command
« Reply #24 on: July 04, 2014, 11:45:37 AM »
We have disscussed it with Rise and he confirmed it, so on the B-B podcast, we announced that the PSMM, is CANCLED.
Sorry very much.