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


Author Topic: How to make a mod for Free Roam mode  (Read 3101 times)

0 Members and 1 Guest are viewing this topic.

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
How to make a mod for Free Roam mode
« on: May 30, 2021, 09:49:45 PM »
Ok Hello everyone, I am Poters, this time I will provide a tutorial on how to make a bully mod for Free Roam mode, I know that currently the Bully Board forum is dead, but make no mistake even though this forum is dead, but there are still many people who often visit this forum to learn to mod.
okay, let's just go to the tutorial, for this time I will only teach how to make simple mods, because I myself am a beginner modder.  :D

Well, the first step you have to do first is to download the LUA Scripts that I have made :
https://www.mediafire.com/download/ocgj2243yv2yuz9

If you have downloaded the file, we just need to edit the scripts.
You can use Notepad ++ for those of you who have a PC, and you can use Quick Edit, for those of you who don't have a PC.

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #1 on: May 30, 2021, 10:01:09 PM »
Ok if you have opened the Scripts.lua file that I created,
Immediately, you name the function, you are free to give any name, for example, I will fill in the function Flash()

Note :
You must use brackets () if you have already given a name to the function
« Last Edit: May 30, 2021, 10:28:04 PM by Poters »

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #2 on: May 30, 2021, 10:26:27 PM »
Next, you type the function or code like this,
Type under Wait(0).
local X, Y, Z = PlayerGetPosXYZ()
if PedMePlaying(gPlayer, "Default_KEY") and IsButtonPressed(7,0) and not PlayerIsInAnyVehicle() then
    GameSetPedStat(gPlayer, 20, 200)
    Lightning = EffectCreate("ElectrocuteLRG", X, Y, Z + 0.2)

Note :
- local X, Y, Z = PlayerGetPosXYZ()
functions to give the Player a position where the Player is

- if PedMePlaying (gPlayer, "Default_KEY")
functions so that this mod is only active when the Player is standing upright

- if IsButtonPressed (7,0)
function how to activate the mod, (7,0) is Sprint, to know more about the Code Button you can see it here :
https://bullylua.neocities.org/legacy/script/controls.html

not PlayerIsInAnyVehicle()
functions to check the Player's condition whether the Player is not in a vehicle, and also functions so that this mod is not active while in a vehicle

- GameSetPedStat(gPlayer, 20, 200)
functions to change the speed of the Player

- Lightning = EffectCreate ("ElectrocuteLRG", X, Y, Z + 0.2)
functions to spawn the Effect where the Player is.
"ElectrocuteLRG" is the Effect model that will be spawned,
here I added Z + 0.2 to change the height of the Spawn Effect
« Last Edit: May 30, 2021, 10:32:09 PM by Poters »

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #3 on: May 30, 2021, 10:45:25 PM »
Ok then you type the new code again after or below the code Lightning = EffectCreate ("ElectrocuteLRG", X, Y, Z + 0.2)

if EffectIsRunning(Lightning) then
    Wait (0.2)
    EffectSlowKill (Lightning, 1, true)
end

Note :
- EffectIsRunning(Lightning)
functions to check the condition of the effect, whether the effect is in progress or not

- Wait(0.2)
functions to solve the bugs that occur in this mod, the Wait (0.2) function is not actually a bug fix, but I only use it to solve a bug that occurs in this mod.

- EffectSlowKill(Lightning, 1, true)
functions to remove the effect that has been spawned

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #4 on: May 30, 2021, 10:54:57 PM »
Well for the last step, you type this code after or under the word end, align it with the code if PedMePlaying(gPlayer, "Default_KEY") and IsButtonPressed(7,0) and not PlayerIsInAnyVehicle() then.

elseif not IsButtonPressed(7,0) then
    GameSetPedStat(gPlayer, 20, 100)

Note :
- elseif not IsButtonPressed(7.0)
This function is so that the mod is not active if the Player is not running or Sprint

- GameSetPedStat(gPlayer, 20, 100)
functions to change the Player speed back to Normal
« Last Edit: May 30, 2021, 11:25:42 PM by Poters »

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #5 on: May 30, 2021, 11:02:55 PM »
Oh yes, I forgot, you have to fill in CreateThread according to the name of the function that was given
example : CreateThread("Flash")

Ok, this Modding tutorial is finished here.
sorry if my tutorial is very difficult to understand, and sorry if my english is very bad, because i'm from Indonesia.  :laugh:
but I hope you can understand this tutorial and don't mind my bad English ..

Important Notes that you should know :
if you use the "if" function at the end of the sentence you must use the "then" function
then to end it using the "end" function
then if you use the "while" function
below it there should be a function "Wait(0)"
and also if you want to use any other command you can use the "elseif" function
And if you want to make a Free Roam mod, you have to use the function
while true do
    Wait(0)
« Last Edit: May 30, 2021, 11:38:55 PM by Poters »

Offline Poters

  • Jr. Member
  • **
  • Posts: 32
  • Gender: Male
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #6 on: May 30, 2021, 11:07:19 PM »
For the results of the mods made this time are like this  :D

Offline RBS ID

  • Jr. Member
  • **
  • Posts: 67
  • Gender: Male
  • I don't know.
    • View Profile
    • This is website title.
Re: How to make a mod for Free Roam mode
« Reply #7 on: May 30, 2021, 11:26:29 PM »

Nice work, dude..
 

Offline Owais Qadri

  • Gerjaffers
  • Hero Member
  • ****
  • Posts: 1,995
  • Gender: Male
  • I Love Sunny Days.
    • View Profile
Re: How to make a mod for Free Roam mode
« Reply #8 on: August 12, 2021, 12:16:05 PM »
Awesome mods