S0rcerer Posted September 17, 2008 Share Posted September 17, 2008 event "onClientMarkerHit" doesnt work this is my scripts server function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) -- get the player's position -- create a cylindrical marker next to the player: createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then -- check if the marker was created successfully outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) function joinHandler()--скинуть игрока local x,y,z x = 1959.55 y = -1714.46 z = 16 spawnPlayer(source, x, y, z, 0, 114) createPickup ( x, y, z, 0, 100, 1) createBlipAttachedTo ( source, 0, 2, 255, 0, 0, 140 ) giveWeapon ( source , 32 , 500 ) giveWeapon ( source , 42, 2000 ) giveWeapon ( source , 24, 100 ) giveWeapon ( source , 9, 1 ) fadeCamera(source, true) outputChatBox ("Welcome to hell", source) end addEventHandler('onPlayerJoin', getRootElement(), joinHandler) it is example from Wiki and client script function MarkerHit ( hitPlayer, matchingDimension ) outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" ) end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) help please Link to comment
Gamesnert Posted September 17, 2008 Share Posted September 17, 2008 onClientMarkerHit is a DP3+ only event, meaning it doesn't work with DP2.x... Solution is making a colsphere at the same location and the same size, then calling onClientColShapeHit instead. I think this isn't as effective, but does make markers work client-side. EDIT: Fixed link. Lol. Link to comment
Recommended Posts