Jump to content

[Ajuda] esse script não quer funcionar


Recommended Posts

I want to create this script to give kick in whom commit helikill

function kickjog (source)  
kickPlayer ( kicked, source, " has been kicked Helikill " ) 
end 
AddEventHandler ( "onClientPlayerHeliKilled" , getLocalPlayer ( ) , kickjog ) 

Link to comment
function kickjog (killer) 
kickPlayer ( kicked, killer, getPlayerName.." has been kicked Helikill " ) 
end 
addEventHandler ( "onClientPlayerHeliKilled" , root , kickjog ) 

Use portugues section.

Link to comment
function kickjog (killer) 
kickPlayer ( kicked, killer, getPlayerName.." has been kicked Helikill " ) 
end 
addEventHandler ( "onClientPlayerHeliKilled" , root , kickjog ) 

Use portugues section.

I Hope it's a joke :P the event client side and the function server side :roll: .

Link to comment

Here;

-- Client: 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( killer ) 
    triggerServerEvent("kickAPlayer", source, killer) 
   end 
) 
  
-- Server 
  
addEvent ( "kickAPlayer", true ) 
addEventHandler ( "kickAPlayer", root, 
  function ( who ) 
    kickPlayer ( who, "You killed: ".. getPlayerName ( source ) .." With A Heli." ) 
  end 
) 

Edited by Guest
Link to comment
Here;
-- Client: 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( killer ) 
    triggerServerEvent("kickAPlayer", source, killer) 
   end 
) 
  
-- Server 
  
addEvent ( "onClientPlayerHeliKilled", true ) 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( who ) 
    kickPlayer ( who, "You killed: ".. getPlayerName ( source ) .." With A Heli." ) 
  end 
) 

You are triggering a ''kickAPlayer" Event and at the server side "onClientPlayerHeliKilled" I hope it's another joke :mrgreen: .

Link to comment
Here;
-- Client: 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( killer ) 
    triggerServerEvent("kickAPlayer", source, killer) 
   end 
) 
  
-- Server 
  
addEvent ( "onClientPlayerHeliKilled", true ) 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( who ) 
    kickPlayer ( who, "You killed: ".. getPlayerName ( source ) .." With A Heli." ) 
  end 
) 

You are triggering a ''kickAPlayer" Event and at the server side "onClientPlayerHeliKilled" I hope it's another joke :mrgreen: .

Code is fixed now.

Link to comment
function kickjog (killer) 
kickPlayer ( kicked, killer, getPlayerName.." has been kicked Helikill " ) 
end 
addEventHandler ( "onClientPlayerHeliKilled" , root , kickjog ) 

Use portugues section.

I Hope it's a joke :P the event client side and the function server side :roll: .

In this days I have been distracted. ._.

Link to comment

You are trying to kick a vehicle, see what the killer argument is !

You should use :

getVehicleOccupant 
or 
getVehicleController 

+ and make sure you have the tag in your meta.xml, So the onClientPlayerHeliKilled event work

Link to comment

all right now?

  
  
-- Client: 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( killer ) 
    triggerServerEvent("kickAPlayer", source, killer) 
   end 
) 
  
-- Server 
  
addEvent ( "onClientPlayerHeliKilled", true ) 
addEventHandler ( "onClientPlayerHeliKilled", root, 
  function ( who ) 
    getElementType ( killer ) == "player" ) then 
            local vehicle = getPedOccupiedVehicle(killer) 
            if ( vehicle ) then 
                usedVehicle = getElementModel ( vehicle ) 
            kickPlayer ( who, "You killed: ".. getPlayerName ( source ) .." With A Heli." ) 
            end 
  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...