Bully-Board

Bully Modding Section => Modding Questions/Help => Modding Questions/Help Archives => Topic started by: embas10 on May 27, 2014, 06:18:17 AM

Title: Adding Corona And Missionsucces in lua?
Post by: embas10 on May 27, 2014, 06:18:17 AM
is there Anyone now? how to add a color corona like in mission is yellow color, and if challenge is red, and if activities is blue, and etc
and how to add a mission succes and mission failed text in lua.? :)
Title: Re: Adding Corona And Missionsucces in lua?
Post by: c00ld0c26 on May 27, 2014, 06:32:37 AM
Simple.

If the condition you wanted to make you success the mission is true then write this command after it :

MissionSucceed() (could be MissionSuccess() too, since I didn't check, but its one of those)

same goes for the MissionFail() just with the condition you have set to fail will be true.

About the color thing, it requires a special file for it, but there is a way around it using PedInRectangle() + BlipAddXYZ() or BlipAdd()
Title: Re: Adding Corona And Missionsucces in lua?
Post by: embas10 on May 28, 2014, 07:11:15 AM
can you make example?? i still don't understand  :hmm:
are adding the corona it's like this??
PedInRectangle() + BlipAddXYZ(X ,Y ,Z ) or
PedInRectangle() + BlipAdd(X , Y ,Z )
Title: Re: Adding Corona And Missionsucces in lua?
Post by: embas10 on May 31, 2014, 06:39:25 AM
Hey Coold0c i had try it but nothing working, are heres below will working?
Code: [Select]
PedInRectangle(Blue) + BlipAddXYZ( 270, -114, 6 )
The blue mean are blue corona. are it's will work like this??
Title: Re: Adding Corona And Missionsucces in lua?
Post by: c00ld0c26 on June 17, 2014, 07:26:36 AM
No....
Its not like this...

Like this :

Code: [Select]
Blips = function()
NAME = BlipAddXYZ(ID,X,Y,Z)
end

Updater = function()
PlayerGetPosXYZ()
end

Condition = function()
if PedInRectangle(gPlayer,X1,Y1,X2,Y2) then
CODE HERE
elseif PedInRectangle(gPlayer,X1,Y1,X2,Y2) and IsButtonBeingPressed(ID,ID) then
CODE HERE
end
end

main = function()
Blips()
repeat
Updater()
Condition()
Wait(0)
until not Alive
end
end

Note : X1,Y1,X2,Y2 in the PedInRectangle() are the coords you want the player to be in to active the code.
It creates a round shape, which means if the player is between X1,Y1,X2, and Y2 the code will be activated.
Example :

if PedInRectangle(gPlayer,5,2,1,3) then


If I will go ingame and be between the coords 5, 2, 1, and 3, the code will run.
Title: Re: Adding Corona And Missionsucces in lua?
Post by: Mick3Mouse on June 17, 2014, 05:19:11 PM
uhhhhh.


Im saying thanks For him.. 


THANK YA C00L I LOVE YA!!  :)
Title: Re: Adding Corona And Missionsucces in lua?
Post by: c00ld0c26 on June 18, 2014, 12:37:56 AM
uhhhhh.


Im saying thanks For him.. 


THANK YA C00L I LOVE YA!!  :)

no problem man.
Title: Re: Adding Corona And Missionsucces in lua?
Post by: embas10 on June 18, 2014, 05:49:12 AM
Thx dude . Anyway you late to post. But thankyou verymuch :D
Title: Re: Adding Corona And Missionsucces in lua?
Post by: c00ld0c26 on June 18, 2014, 05:56:10 AM
Was a little busy lately.
Good luck.