SaZ, A CS:2D Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 

 


Rechercher Advanced Search

Keywords

LiLia  

Latest topics
» Bus School Application to be VIP
minecraft ! Empty10/7/2015, 9:22 pm by Bus School

» The main forum has been moved
minecraft ! Empty21/6/2015, 10:38 pm by Anonymous :D

» Application to be mod on saz server
minecraft ! Empty28/3/2015, 7:33 pm by Anonymous :D

» Aplication mod
minecraft ! Empty6/2/2015, 8:12 am by Ajmin

» Refurbishing the forum
minecraft ! Empty4/2/2015, 6:44 pm by ZxC

» Ban appeals request
minecraft ! Empty4/2/2015, 6:32 pm by ZxC

» Suggesting ideas
minecraft ! Empty4/2/2015, 6:23 pm by ZxC

» Rule violation and banning
minecraft ! Empty4/2/2015, 6:01 pm by ZxC

» Server Rules
minecraft ! Empty4/2/2015, 5:57 pm by ZxC

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar


minecraft !

3 posters

Go down

Idea minecraft !

Post by DZiRi FoUaD 9/10/2014, 10:36 pm

this is a lua safe zone script for minecraft server : (but only in tp area in "mc palstine lake"
paste it in server.lua



safe = {}

for _,e in pairs(entitylist()) do
if entity(e.x,e.y,"typename") == "Env_Hurt" and entity(e.x,e.y,"int0") == -100 and entity(e.x,e.y,"int1") == 2 then
local x=e.x
local y=e.y
local x2=(e.x-1)+entity(e.x,e.y,"int2")
local y2=(e.y-1)+entity(e.x,e.y,"int3")

table.insert(safe,{x,x2,y,y2})
end
end

function init_array(length,mode)
local array = {}
for i = 1,length do
array[i] = mode
end
return array
end

player_safe = init_array(32,false)

addhook("movetile","movetile")
addhook("hit","hit")

function hit(id)
if player_safe[id] then
return 1
end
return 0
end

function movetile(id,x,y)
for i in ipairs(safe) do
if x >= safe[i][1] and x <= safe[i][2] and y >= safe[i][3] and y <= safe[i][4] then
player_safe[id] = true
break
else
player_safe[id] = false
end
end
update_hud(id)
end

function update_hud(id)
if player_safe[id] then
parse("hudtxt2 "..id.." 1 \"SAFE ZONE\" 318 200 1")
else
parse("hudtxt2 "..id.." 1 \"\" 300 210 0")
end
end




DZiRi FoUaD
DZiRi FoUaD
Admin
Admin

Posts : 95
Thanks : 0
Join date : 2014-10-03
Age : 24
Location : algeria

Back to top Go down

Idea Re: minecraft !

Post by TopNorTH 9/10/2014, 11:10 pm

Nice and we need this lua to the safe zone for Minecraft, We need to wait Ajmin/Dice Put this lua in Minecraft.
TopNorTH
TopNorTH
User
User

Posts : 79
Thanks : -2
Join date : 2014-10-08
Age : 26
Location : Grand Britain

Back to top Go down

Idea Re: minecraft !

Post by ZxC 10/10/2014, 9:54 am

Next time use the code button please.

Also this lua is not bad at all, but we need Ajmin to control this lua.
ZxC
ZxC
Owner
Owner

Posts : 655
Thanks : 0
Join date : 2014-08-20
Location : Italy

Back to top Go down

Idea Re: minecraft !

Post by DZiRi FoUaD 10/10/2014, 10:01 am

i am not very good in scripting maybe ajmin will fix it .
DZiRi FoUaD
DZiRi FoUaD
Admin
Admin

Posts : 95
Thanks : 0
Join date : 2014-10-03
Age : 24
Location : algeria

Back to top Go down

Idea Re: minecraft !

Post by Guest 10/10/2014, 12:39 pm

I already installed safe zone script.
but it was leading to some bugs.
so unfortunately i removed it.

And this lua is 100% stolen.

Automatic safezone (USGN)

Guest
Guest


Back to top Go down

Idea Re: minecraft !

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum