Jump to content

Trigger Problem (Important)


Voltex'GNR

Recommended Posts

local col3 = createColSphere ( 1787.3724365234, 1608.2197265625, 6.734375, 1000 )

function onPlayerJoin(thePlayer)

if isElementWithinColShape ( thePlayer, col3 ) then

addEventHandler("onClientRender", getRootElement(), dxDraw)

end

end

addEvent("onColShapeHit")

addEventHandler ( "onColShapeHit", col3, onPlayerJoin )

--Client

local screenW, screenH = guiGetScreenSize()

function dxDraw()

dxDrawText("Updates", screenW*0.7891, screenH*0.7598, screenW*0.9187, screenH*0.8076, tocolor(255, 27, 27, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)

end

Link to comment

1. Use the code function

2. The name of the function is totally irritating.

3. Can't you just use it clientsided?

4. Else you have to use triggerClientEvent.

5. You only use addEvent when you create a new custom event. onColShapeHit isn't a custom event.

6. You cant use the Event onClientRender serversided.

7. dxDraw is a clientsided function here, so you can't use it serversided.

8. You should use onColShapeLeave too

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