0
Cole Phelps

Mafia 2 beacon issue

Recommended Posts

 

In 50 second, we see cops leaving the car and the beacon's still working. But when I drive a cop car with working beacon and when I leave it, this beacon stops. Could it be changed some way ? I mean making a beacon working even after leaving a car. Hope you'll understand.

 

Thanks for any help with that.

Share this post


Link to post
Share on other sites

not possible with the command that is used

game.game:GetActivePlayer():GetOwner():SetBeaconLightOn(true)
she is linked to player

 

should use

game.entitywrapper:GetEntityByName("name car entity"):SetBeaconLightOn(true)
the only problem we do not know ("name car entity") used by A.I

Share this post


Link to post
Share on other sites

@Cole

 

Sorry to reactivate this old closed topic but I just saw it

 

 

So cole, if you want to keep the police car beacon switched on when you are outside of the car

use the injector with my commented script bellow ;)

 

@eXistenZ

en:it doesn't matter if we do not know the NPC entity, if we had an interaction with it once ...

fr:si on a une interaction avec une entit̮̩, il n'est pas grave de ne pas connaitre le nom de l' entit̮̩ utilis̮̩ par le jeu ...

 

policebeacon.jpg

 

for example F7.lua

 

 

-- A little gift for Cole from Ocram :)

-- as an example, to activate only from inside the car at first !

-- here you store inside the variable 'car' the ''unknown'' car entity name

if m==nil then car=game.game:GetActivePlayer():GetOwner() end

 

-- now with the trick above the variable 'car' will not be overiden no more as it is only taken when variable 'm' is activated/created for the first time

 

 

if m==nil then m=0 end

m=m+1

if m==3 then m=1 end

if m==1 then CommandBuffer:Insert(l_6_0,{function(l_1_0)return car:SetBeaconLightOn(true)end})end

if m==2 then CommandBuffer:Insert(l_6_0,{function(l_2_0)return car:SetBeaconLightOn(false)end})end

 

-- you can now activate this script as many time you want from inside or outside the car

-- It will light the police car beacon on or off, enjoy

 

 

Share this post


Link to post
Share on other sites
Sorry to reactivate this old closed topic but I just saw it

 

Don't worry ocram, I closed it because of no way to help ;)

 

 

 

So cole, if you want to keep the police car beacon switched on when you are outside of the car

use the injector with my commented script bellow ;)

 

@eXistenZ

en:it doesn't matter if we do not know the NPC entity, if we had an interaction with it once ...

fr:si on a une interaction avec une entit̮̩, il n'est pas grave de ne pas connaitre le nom de l' entit̮̩ utilis̮̩ par le jeu ...

 

policebeacon.jpg

 

for example F7.lua

 

 

-- A little gift for Cole from Ocram :)

-- as an example, to activate only from inside the car at first !

-- here you store inside the variable 'car' the ''unknown'' car entity name

if m==nil then car=game.game:GetActivePlayer():GetOwner() end

 

-- now with the trick above the variable 'car' will not be overiden no more as it is only taken when variable 'm' is activated/created for the first time

 

 

if m==nil then m=0 end

m=m+1

if m==3 then m=1 end

if m==1 then CommandBuffer:Insert(l_6_0,{function(l_1_0)return car:SetBeaconLightOn(true)end})end

if m==2 then CommandBuffer:Insert(l_6_0,{function(l_2_0)return car:SetBeaconLightOn(false)end})end

 

-- you can now activate this script as many time you want from inside or outside the car

-- It will light the police car beacon on or off, enjoy

 

 

 

Should I use one LUA file or two for these commands ? ;)

 

And please post a link to the best Injector's version, thanks ;)

 

 

Cole

Share this post


Link to post
Share on other sites

Copy past the entire content of the spoiler into F7.lua .

it is only one script,( inside a lua file the -- are just to specify a comment line and are part of the script, so the entire spoiler is the script itself ) :P

 

 

For injector V6 download

link on animation topic by eXistenZ http://www.mediafire.com/?7ix394nrvoakbs5

or Link to the original project files http://code.google.com/p/mafia2injector/downloads/list

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0