Jammie Posted February 4, 2010 Share Posted February 4, 2010 My problem is if I make a greenzone then are the positions wrong, very strange. And my other problem is if you get a car or bike then you can driveby in the greenzone. Can someone help me to make a good safezone. Maybe is this script too old or something because I had this script 2 years and it works very good. Only not anymore..! This is my script: -- Greenzone Pirate Ship x, y, size = 1844.5594482422, 1375.3376464844, 120 local greenzone = createColRectangle ( x-size/2, y-size/2, 120, 120 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) function greenzone_Enter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Entered The Greenzone!", thePlayer, 177, 252, 3 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPlayerWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzone_Enter ) function greenzone_Exit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The Greenzone!", thePlayer, 177, 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, greenzone_Exit ) Link to comment
Wisin Posted February 4, 2010 Share Posted February 4, 2010 (edited) edit: sorry i dint readed well, by the way i fixed your code i tested and its working here is it -- Greenzone Pirate Ship x, y, size = 1844.5594482422, 1375.3376464844, 120 local greenzone = createColRectangle ( 1844.5594482422, 1375.3376464844, 284, 312.22 ) local greenzonemaparea = createRadarArea (1844.5594482422, 1375.3376464844, 284, 312.22, 0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Entered The Greenzone!", thePlayer, 177, 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, 177, 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 ) also use setPedWeaponSlot like i put there Edited February 4, 2010 by Guest Link to comment
Jammie Posted February 4, 2010 Author Share Posted February 4, 2010 Ok, but can someone helps me about that position.. because every time doesnt work the area with the col... Link to comment
dzek (varez) Posted February 4, 2010 Share Posted February 4, 2010 i reported this topic to be moved to scripting help. i also thinking about how to create a temporary "god mode" Link to comment
robhol Posted February 4, 2010 Share Posted February 4, 2010 A near-perfect "godmode" can be created by hooking onClientPlayerDamage and cancelling it. That will block pretty much any damage. Of course, you can set element data or something when the player enters and leaves the area and then check it to see if you should cancel or not. On a side note, the lack of original ideas and everybody's seeming willingness to create perfect duplicates of existing or earlier servers is a bit depressing. MTA could use some new ideas, server-wise. Link to comment
dzek (varez) Posted February 4, 2010 Share Posted February 4, 2010 my server isn't clone of existing servers. ive already spent a lot of time on it (scripting, mapping), and plan to spend more.. i just want a safe zone on spawn, as i see more and more spawn killers (kicking them automatically is not a good idea for me) Link to comment
robhol Posted February 4, 2010 Share Posted February 4, 2010 I wasn't talking to you, but the actual topic. Link to comment
Jammie Posted February 4, 2010 Author Share Posted February 4, 2010 It works great Wisin! Thank you so much! only one thing! real drive-by is not blocking:P do you know how I can disallow real drive by? thanks!! Link to comment
dzek (varez) Posted February 4, 2010 Share Posted February 4, 2010 Jammie, you will proabably need to modify real_driveby resource Link to comment
Jammie Posted February 4, 2010 Author Share Posted February 4, 2010 Ok and do you know what I must modify to real drive by script? Link to comment
Wisin Posted February 6, 2010 Share Posted February 6, 2010 realy no idea of what u must edit sorry , i was testing ways to get it working but no luck, by the way i will take a look again soon, i dont have much time making own things Link to comment
dzek (varez) Posted February 6, 2010 Share Posted February 6, 2010 i dont have much time making own things in 90% cases this is called lazyness i have it too Link to comment
Wisin Posted February 6, 2010 Share Posted February 6, 2010 realy i dint understand what u mean cuz im not english, im just busy with my own server and real life things work,study,etc etc. 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