Jump to content

killingyasoon

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by killingyasoon

  1. how to set a limit for a marker like the marker accepts only 1 player inside it, lets make it a bit clear, we got marker x and player z and player y, player z enters the marker x and the marker works, player y enters, the marker doesnt work for him.

  2. 
    function MarkerHit (player,hitElement, matchingDimension)
       if getPlayerMoney(player) < 500 then
    
      outputChatBox("you dont have money", player, 255, 0, 0)
    return 
     end    
       outputChatBox("You lost your stars", player, 255,255,0)
      setPlayerWantedLevel (player, 0 )
        takePlayerMoney(player, 500)
    
    end 
    addEventHandler( "onMarkerHit", Marker, MarkerHit )
    
    --this isnt the full script

    how can i restrict it for 1 to 5 stars

  3. how to move the camera, cant get it done.

    local cameras = {
    	{ 329.10980224609, -2117.2749023438, 50.161201477051, 329.65179443359, -2116.4926757813, 49.853763580322 },
    	{ 1463.18, -1143.13, 194.36, 1463.18, -1143.13, 194.36 }
    	
    }
    
    function cam( plr )
    	local theplr = nil
    	if ( source and getElementType ( source ) == 'player' ) then
    		theplr = source
    	elseif ( plr and getElementType ( plr ) == 'player' ) then
    		theplr = plr
    	end
    	setTimer ( function ( p )
    		local ind = math.random ( #cameras )
    		setCameraMatrix ( p, unpack ( cameras[ind] ) )
    		fadeCamera ( p, true )
    	end, 700, 1, theplr )
    end
    addEventHandler ( "onPlayerJoin", root, cam )
    addEventHandler ( "onPlayerLogout", root, cam )

     

  4. function binds()
    	bindKey(KeyToOpen or "F1","down", function ()  
    		guiSetVisible(panel,not guiGetVisible(panel) )
    		showCursor(guiGetVisible(panel))
    		if guiGetVisible(panel) == true then mode = "no_binds_when_editing" else mode = "allow_binds" end
    		guiSetInputMode(mode or "allow_binds")
    	end
    	end )

    can you add it here? if possible

  5. 9 minutes ago, Sorata_Kanda said:
    
    local safezone = createColRectangle (22,22,22,20,30)   --this is just a random number..
    setElementDimension( safezone, 3 ) -- Dimension is 3, you can use another number aswell.
    local Radar = createRadarArea ( 790.6, -1120.1,50,50,r, g, b, alpha)   
      
      
    addEventHandler ( "onColShapeHit", safezone,  
    function  (thePlayer,matchingDimension ) 
          if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
       toggleControl ( thePlayer, "fire",false ) 
         
       end 
    end)
      
    addEventHandler ( "onColShapeLeave", safezone,  
    function ( thePlayer, matchingDimension ) 
            if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
             toggleControl ( thePlayer, "fire", true )
         end 
    end) 
    

     

     

    nothing happend so far.

  6. local safezone = createColRectangle (22,22,22,20,30)   --this is just a random number..
    local Radar = createRadarArea ( 790.6, -1120.1,50,50,r, g, b, alpha)   
      
      
    addEventHandler ( "onColShapeHit", safezone,  
    function  (thePlayer,matchingDimension ) 
          if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
       toggleControl ( thePlayer, "fire",false ) 
         
       end 
    end)
      
    addEventHandler ( "onColShapeLeave", safezone,  
    function ( thePlayer, matchingDimension ) 
            if matchingDimension and isElement(thePlayer) and getElementType(thePlayer) == "player" then 
             toggleControl ( thePlayer, "fire", true ) 
         end 
    end) 

    how can i change the dim of this safezone ?, i tried doing everything, any help would be appreciated.

×
×
  • Create New...