Jump to content

Anti Zombi Area Problem


Crab

Recommended Posts

I am made a Anti Zombi Area Code. This is working but i want to add 2 or more skin to have access join this area.

   if ( skin == 0) then this is working but

if ( skin == 0, 257 ) not working or

if { skin == 0, 257 ) not working.
 

if i write 2 or more skin this section all skins get acces to join area. please help me...

 


 

safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 )
safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255, 50 )
setElementData (safeZoneRadar, "zombieProof", true)

function enterZone(hitPlayer,thePlayer)
local skin = getElementModel (hitPlayer)
     if ( skin == 0) then
    toggleControl (hitPlayer, "fire", true )
    toggleControl (hitPlayer, "aim_weapon", true)
    toggleControl (hitPlayer, "vehicle_fire", true)
    outputChatBox("You entering the area 69.", hitPlayer, 0, 255, 0)
       else
         killPed (hitPlayer)
end
end
addEventHandler( "onColShapeHit", safecol, enterZone )

function leaveZone(hitPlayer,thePlayer)
local skin = getElementModel (hitPlayer)
    toggleControl (hitPlayer, "fire", true)
    toggleControl (hitPlayer, "aim_weapon", true)
    toggleControl (hitPlayer, "vehicle_fire", true)
    outputChatBox("You out the area 69", hitPlayer, 255, 0, 0)
 if not ( skin == 0 ) then
  killPed (hitPlayer)
end
end
addEventHandler( "onColShapeLeave", safecol, leaveZone )

 

Edited by jhxp
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...