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


Show Posts

Messages | * Topics | Attachments

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - HairyButtNugget

Pages: [1]
1
Modding Questions/Help Archives / Stealth Missions?
« on: September 24, 2016, 01:36:29 PM »
Hi. I'm new to modding bully so i was going over ideas for my first mission mod. I thought of making a stealth style mission with cones of sight on the mini-map etc but I'm not sure if its possible. I don't think I have ever seen it been done before. Does anyone know if it is possible to do and if so how to do it?

Thanks  :)

2
LUA Scripting Help / Help with PedIsInAreaXYZ
« on: August 20, 2016, 06:07:54 AM »
Hi there. I am very new to modding (only started yesterday) but i have some simple coding experience in python. I want to learn how to mod bully. I learned the basics of how to spawn peds and setting player health etc and I am trying to learn how to make a mission but i cant get the "PedIsInAreaXYZ" command to work properly. I have been changing and adapting my code for many hours but cannot get it to work.

Here is the code at the moment:

Code: [Select]
MissionSetup = function()
PlayerSetHealth(200)
AreaTransitionXYZ(0,270,-110,6.000000953674)
Gary = PedCreateXYZ(130,271,-73,5.992765495)
end

MissionCleanup = function()
end

function main()
repeat
Mission1()
wait(0)
until not Alive
end

Mission1 = function()
if PedIsInAreaXYZ(gPlayer,271,-73,5.992765495,10) then
TextPrintString("Success", 5, 1)
else main()
end
end

I tried to make the code constantly check if the player is in range of Gary by making the main function keep running the "Mission1" function.

I want the code to work like this:

1. Gary spawns at co-ordinates.
2. Player walks over to Gary.
3. Text "Success" is shown.

If anyone can give me some help i would really appreciate it :).

P.S. Sorry if the problem is extremely simple. I'm very new and couldn't find any help anywhere on the internet.

Pages: [1]