Death Posted May 21, 2013 Share Posted May 21, 2013 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
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 This is not the right section this is the right section : Portuguese / Português ‹ Programação em Lua Link to comment
Death Posted May 21, 2013 Author Share Posted May 21, 2013 (edited) plis help me Edited May 21, 2013 by Guest Link to comment
manawydan Posted May 21, 2013 Share Posted May 21, 2013 use a seção portuguesa. e acho que o 1° erro foi "Add" o certo seria add Link to comment
Sasu Posted May 21, 2013 Share Posted May 21, 2013 function kickjog (killer) kickPlayer ( kicked, killer, getPlayerName.." has been kicked Helikill " ) end addEventHandler ( "onClientPlayerHeliKilled" , root , kickjog ) Use portugues section. Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 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 the event client side and the function server side . Link to comment
xXMADEXx Posted May 21, 2013 Share Posted May 21, 2013 (edited) 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 May 21, 2013 by Guest Link to comment
iPrestege Posted May 21, 2013 Share Posted May 21, 2013 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 . Link to comment
xXMADEXx Posted May 21, 2013 Share Posted May 21, 2013 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 . Code is fixed now. Link to comment
Sasu Posted May 21, 2013 Share Posted May 21, 2013 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 the event client side and the function server side . In this days I have been distracted. ._. Link to comment
PaiN^ Posted May 22, 2013 Share Posted May 22, 2013 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
Death Posted May 22, 2013 Author Share Posted May 22, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now