esporta Posted June 26, 2013 Share Posted June 26, 2013 (edited) safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if ( skin == 285,217,286,165,163,163,166,228 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("You message here example: 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 message here example: you out the area 69", hitPlayer, 255, 0, 0) if not ( skin == 285,217,286,165,163,163,166,228 ) then killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) If I put that code to my server it will work? I make little changes from original one. If i did wrong please tell me. Edited June 26, 2013 by Guest Link to comment
xXMADEXx Posted June 26, 2013 Share Posted June 26, 2013 Why not try it, then ask if i dosn't work? Link to comment
esporta Posted June 26, 2013 Author Share Posted June 26, 2013 it is not working. What i did wrong? Link to comment
xTravax Posted June 26, 2013 Share Posted June 26, 2013 Dont you need x,y,z coordinates ? In 2nd line is just x,y and no z coordinates? Link to comment
esporta Posted June 26, 2013 Author Share Posted June 26, 2013 Dont you need x,y,z coordinates ?In 2nd line is just x,y and no z coordinates? Z is not important. I just created a square. And if anybody try to enter there without these skins"285,217,286,165,163,163,166,228" they will be dead. I dont set z because they enter that zone and attack with helis or etc. Link to comment
esporta Posted June 26, 2013 Author Share Posted June 26, 2013 Dont you need x,y,z coordinates ?In 2nd line is just x,y and no z coordinates? This is original script it is working till I edit it. safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if ( skin == 287 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("You message here example: 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 message here example: you out the area 69", hitPlayer, 255, 0, 0) if not ( skin == 287 ) then killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Link to comment
MTA Team 0xCiBeR Posted June 27, 2013 MTA Team Share Posted June 27, 2013 safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 255, 255 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer) local skin = getElementModel (hitPlayer) if ( skin == 285,217,286,165,163,163,166,228 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("You message here example: you entering the area 69.", hitPlayer, 0, 255, 0) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer) local skin = getElementModel (hitPlayer) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) outputChatBox("You message here example: you out the area 69", hitPlayer, 255, 0, 0) if not ( skin == 285,217,286,165,163,163,166,228 ) then killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) You are messing with variables..The second variable of "onColShapeHit" is the matching dimension, and yo seted a Global variable like (thePlayer)...Thats your error.. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now