Jump to content

onClientMarkerHit problem


S0rcerer

Recommended Posts

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...