Jump to content

Problem with MarkerHit


600er

Recommended Posts

Hello guys. I need you help on a script i was doing.

So.. i put this script server and client side (not at one time) but it didn't work.

/debugscript 3 isn't showing some problems.

Here is it:

myMarker = createMarker ( 165.39999389648, 1973.5999755859, 23.60000038147, cylinder, 1.2, 0, 255, 0, 250, root ) 
myBlip = createBlipAttachedTo(myMarker, 56, 2, 0, 0, 0, 255, 0, 300, root ) 
createBlip ( -1315 , 2519 , 87 , 62 ) 
myTeam = createTeam ( Team1, 170, 255, 0 ) 
  
  
function MarkerHit( hitElement, matchingDimension ) 
    if myMarker then  
    setPlayerTeam ( source, Team1 ) 
        setPlayerSkin ( thePlayer, 50 ) 
    outputChatBox( elementType.." Good job. You entered the marker.", getRootElement(), 0, 255, 0 ) 
    outputChatBox( "Now GTFO before you get banned.", getRootElement(), 0, 255, 0 ) 
    end 
end 
addEventHandler( "onMarkerHit", myMarker, MarkerHit ) 

Can you help me to fix it pls?

Thanks :)

Link to comment

its another frankenstein script.

meaning you just sticked some parts together, tried it on the server, on the client, and of course it doesnt work anywhere, because you have absolutely no idea what you're doing.

main problems here are: the lack of quotes and inconsistent variable names.

Link to comment

It's server-only due to the event you're using.

-Instead of if myMarker type if getElementType(hitElement) == 'player'

-@setPlayerTeam use hitElement instead of source

-@setPlayerSkin use setElementModel(hitElement, 50)

-@outputChatBox use getPlayerName(hitElement) instead of elementType

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