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


Author Topic: Adding Corona And Missionsucces in lua?  (Read 3110 times)

0 Members and 2 Guests are viewing this topic.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Adding Corona And Missionsucces in lua?
« 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.? :)

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Adding Corona And Missionsucces in lua?
« Reply #1 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()

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Adding Corona And Missionsucces in lua?
« Reply #2 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 )
« Last Edit: May 29, 2014, 04:51:49 AM by embas10 »

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Adding Corona And Missionsucces in lua?
« Reply #3 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??

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Adding Corona And Missionsucces in lua?
« Reply #4 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.

Offline Mick3Mouse

  • Obam3mouse
  • Bullworth Junkie
  • ****
  • Posts: 4,343
  • Gender: Male
  • Major Mick3Mouse Algie Hunter
    • View Profile
    • My youtube
Re: Adding Corona And Missionsucces in lua?
« Reply #5 on: June 17, 2014, 05:19:11 PM »
uhhhhh.


Im saying thanks For him.. 


THANK YA C00L I LOVE YA!!  :)

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Adding Corona And Missionsucces in lua?
« Reply #6 on: June 18, 2014, 12:37:56 AM »
uhhhhh.


Im saying thanks For him.. 


THANK YA C00L I LOVE YA!!  :)

no problem man.

Offline embas10

  • Jr. Member
  • **
  • Posts: 27
  • Gender: Male
    • View Profile
Re: Adding Corona And Missionsucces in lua?
« Reply #7 on: June 18, 2014, 05:49:12 AM »
Thx dude . Anyway you late to post. But thankyou verymuch :D

Offline c00ld0c26

  • The D0c
  • Can't Get Enough
  • *****
  • Posts: 5,137
  • Gender: Male
  • Just a dood doing dood things.
    • View Profile
    • My channel.
Re: Adding Corona And Missionsucces in lua?
« Reply #8 on: June 18, 2014, 05:56:10 AM »
Was a little busy lately.
Good luck.