Jump to content

safezone, code


Recommended Posts

when i use this i get a green square on my radar but how can i change the size of it

naamloosbx.png

x, y, size = 228.22802734375, 295.55911254883, 120
local greenzone = createColRectangle ( 228.22802734375, 295.55911254883, 284, 312.22 )
local greenzonemaparea = createRadarArea (228.22802734375, 295.55911254883, 284, 312.22, 0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outputChatBox ( "* You Entered The Greenzone!", thePlayer, 50, 252, 3 )
toggleControl ( thePlayer, "fire", false )
toggleControl ( thePlayer, "next_weapon", false )
toggleControl ( thePlayer, "previous_weapon", false )
setPedWeaponSlot ( thePlayer, 0 )
toggleControl ( thePlayer, "aim_weapon", false )
toggleControl ( thePlayer, "vehicle_fire", false )
toggleControl ( thePlayer, "vehicle_secondary_fire", false )
end
addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter )
 
function greenzoneExit ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outputChatBox ( "* You Left The Greenzone!", thePlayer, 50, 252, 3 )
toggleControl ( thePlayer, "fire", true )
toggleControl ( thePlayer, "next_weapon", true )
toggleControl ( thePlayer, "previous_weapon", true )
toggleControl ( thePlayer, "aim_weapon", true )
toggleControl ( thePlayer, "vehicle_fire", true )
toggleControl ( thePlayer, "vehicle_secondary_fire", true )
end
 
addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit )

Link to comment

Do you expect to get tons and tons of help when you can't:

1) Write a proper question

2) Follow a simple request with no sacrifice on your part (INDENT YOUR CODE. USE [LUA] TAGS.)

3) Prove that you've tried for two milliseconds to make something yourself?

Link to comment

wow, im wondering where he get this code.. its isnt his code for sure :P but this is serverside so it's not stolen.

any green zones was released in community?

idk how to resize thats all

try to make something by yourself..

if this were yours - you will have no problem with resizing or anything..

and you will get to know that if you will bother someday to check this sweet page:

https://wiki.multitheftauto.com/

Link to comment
tyvm for youre help, this help is exactly what i wanted

Bumbling noobs who won't try to lift a finger for a microsecond to get what they want isn't exactly what we wanted either, champ, so cry me a river...

Link to comment
  • 2 weeks later...
  • 2 weeks later...
To make it work with zombies use what you've done with players on peds also, but the zombie script will probably ignore the green zone's effect.

False... Checkout my server: Lithuanian Zombie Infestation

My scripter made a safe zone there the zombies can get in but they dont attack they only walk around ^^

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...