Jump to content

WHAT's the problem????


Recommended Posts

Posted

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 
) 

Posted

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 =)

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
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 
) 

To Visit Us

Press Here: mtasa://5.9.206.180:22002

b648040241b8f01.png

0d0a7bb38ca13e5.png

Posted

You're welcome

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

D: The problem is yet

this is the code (NOW, EDITED)

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

Help D:

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

it still doesn't work. PS: I pass the marker by car is that ImPortant??

ah and the debugscript /3 says it's #5 line (triggerClientEvent, argument 1 got nil)

Posted
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 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Now it says "expected string at argument 1, got nil" ( @ triggerClientEvent )

It should work, are you sure that you're copying it?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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) 

  

Posted

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 
) 

Posted

I tested it and it works perfect as it is.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That's what I though.

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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