Jump to content

WHAT's the problem????


Recommended Posts

WHat is The PRoblem? I'm getting crazy! Now the debugscript doesn't say nothing!!! and it DONT WORK

`CLIENT

function lz () 
outputChatBox("Take it", 255, 255, 0, true) 
end 
  
addEvent ("wii", true) 
addEventHandler ("wii", localPlayer, lz) 

servER

ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) 
  
addEventHandler("onMarkerHit",ma, 
function (  ) 
triggerClientEvent ("wii", source) 
end 
) 

Link to comment
The source of the event onMarkerHit is the marker that got hit, Ust the hitElement parameter

@ 6ArHxiMr'3a[Z]eF : I think he just want to learn about triggering =)

so like this, right?

ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) 
  
addEventHandler("onMarkerHit",ma, 
function ( player ) 
    if getElementType(player) == "player" then 
    outputChatBox("Take it", player, 255, 255, 0, true) 
    end 
end 
) 
Link to comment
ma = createMarker ( x, y, z, "cylinder", 4, 0, 0, 255, 225 ) 
  
addEventHandler ( "onMarkerHit", ma, 
    function ( hitElement ) 
        if ( getElementType ( hitElement ) == "player" ) then 
            triggerClientEvent ( hitElement, "wii", hitElement ) 
        end 
    end 
) 

Link to comment
WHat is The PRoblem? I'm getting crazy! Now the debugscript doesn't say nothing!!! and it DONT WORK

`CLIENT

function lz () 
outputChatBox("Take it", 255, 255, 0, true) 
end 
  
addEvent ("wii", true) 
addEventHandler ("wii", localPlayer, lz) 

servER

ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) 
  
addEventHandler("onMarkerHit",ma, 
function (  ) 
triggerClientEvent ("wii", source) 
end 
) 

Client :

function lz () 
outputChatBox("Take it", 255, 255, 0, true) 
end 
  
addEvent ("wii", true) 
addEventHandler ("wii", root, lz) 

Link to comment

Client :

function lz () 
outputChatBox("Take it", 255, 255, 0, true) 
end 
  
addEvent ("wii", true) 
addEventHandler ("wii", root, lz) 

+ Server:

ma = createMarker (x,y,z, "cylinder", 4, 0, 0, 255, 225 ) 
  
addEventHandler("onMarkerHit",ma, 
function ( p  ) 
triggerClientEvent ( p, "wii", p) 
end 
) 

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