Search
 
 

Display results as :
 

 


Rechercher Advanced Search

Keywords

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

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

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

» Aplication mod
6/2/2015, 8:12 am by Ajmin

» Refurbishing the forum
4/2/2015, 6:44 pm by ZxC

» Ban appeals request
4/2/2015, 6:32 pm by ZxC

» Suggesting ideas
4/2/2015, 6:23 pm by ZxC

» Rule violation and banning
4/2/2015, 6:01 pm by ZxC

» Server Rules
4/2/2015, 5:57 pm by ZxC

November 2017
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   

Calendar Calendar


minecraft !

View previous topic View next topic Go down

Idea minecraft !

Post by DZiRi FoUaD on 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




avatar
DZiRi FoUaD
Admin
Admin

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

Back to top Go down

Idea Re: minecraft !

Post by TopNorTH on 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.
avatar
TopNorTH
User
User

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

Back to top Go down

Idea Re: minecraft !

Post by ZxC on 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.
avatar
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 on 10/10/2014, 10:01 am

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

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

Back to top Go down

Idea Re: minecraft !

Post by Guest on 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

View previous topic View next topic Back to top

- Similar topics

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