Jump to content

colshop


abdalbaset

Recommended Posts

   I want make when's player hit the colsp ped start shoting him I made it like that but my problem that I don't know what to put in client function

Client

  
  
    colsp1=createColSphere ( 2493.623, -1668.179, 13.343, 15 ) 
      
    addEvent( "onPedControl", true ) 
    addEventHandler( "onPedControl", root, 
        function( ) 
            setPedControlState( source, "fire", true ) 
        end 
    ) 
    
    function colh(player) 
    
    
    ---------what to put here? 
    
    end 
addEventHandler("onColShapeHit",colsp1,colh) 
  
  

Server

  
  
  
  
  
  addEventHandler( "onResourceStart", resourceRoot, 
        function( ) 
            local ped = createPed( 191, 2493.623, -1668.179, 13.343, 90 ) 
            setTimer( function( ped ) 
                if ( not isElement( ped ) ) then return end 
                giveWeapon( ped, 27, 9999, true ) 
                triggerClientEvent( root, "onPedControl", ped ) 
                triggerClientEvent( root, "onColShapeHit", ped ) 
            end, 100, 1, ped ) 
        end 
    ) 
    
  

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