Jump to content

Help in onColShapeHit


FurtIF

Recommended Posts

Hello! 

I need a help.

1. I want to stop superman for the player, who entered to the ColShape

2. I want to disable skin changing when the player in ColShape (I used onColShapeHit and setElementModel, but when the player is in the ColShape, he is able to change his skin)

If any of you guys can help me, it would be a greate help for me.

I am new to LUA SCRIPTING

Link to comment

for disable skin changing;

--server-side
local yourCol = createColSphere(...)

addEventHandler("onElementModelChange", root, function(oldModel,newModel)
	if getElementType(source) == "player" then
		if isElementWithinColShape(source,yourCol) then
			setTimer(setElementModel,50,1,source,oldModel)
			outputChatBox("You can't change skin in this place!",source,255,0,0)
		end	
	end
end)

 

Link to comment
1 hour ago, Mahlukat said:

for disable skin changing;


--server-side
local yourCol = createColSphere(...)

addEventHandler("onElementModelChange", root, function(oldModel,newModel)
	if getElementType(source) == "player" then
		if isElementWithinColShape(source,yourCol) then
			setTimer(setElementModel,50,1,source,oldModel)
			outputChatBox("You can't change skin in this place!",source,255,0,0)
		end	
	end
end)

 

Thanks, do you have any idea to stop superman? :/

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...