Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. el_motoblock Rise Against - Give it All Классный клип.
  2. Kenix

    Hunter target

    Try again. And check each row with outputChatBox/outputDebugString. Maybe projectile creator is player ( not vehicle ).
  3. Kenix

    Hunter target

    Client addEventHandler( "onClientProjectileCreation", root, function( creator ) local target = getProjectileTarget( source ) if isElement( target ) and getElementType( target ) == 'vehicle' and isElement( creator ) and getElementType( creator ) == 'vehicle' then local attacker = getVehicleController( creator ) local player = getVehicleController( target ) if isElement( attacker ) and isElement( player ) then triggerServerEvent( 'onVehicleExploded',player,attacker ) end end end ) Server addEvent( 'onVehicleExploded',true ) addEventHandler( 'onVehicleExploded',root, function( attacker ) outputChatBox ( getPlayerName( attacker )..' has killed '..getPlayerName( source )..' with his hunter.',root,255,0,0 ) end ) Updated again.
  4. Kenix

    Hunter target

    My code is wrong I actually was realized. We can't get who create projectile. I think better request parameter attacker for event onVehicleExplode in bug tracker.
  5. Kenix

    Hunter target

    function kill ( ammo, killer, killerweapon, bodypart ) if killer and killer ~= source then if isPedInVehicle( killer ) and killerweapon == 19 or killerweapon == 51 then local vehicle = getPedOccupiedVehicle( killer ) if isElement( vehicle ) and getElementModel( vehicle ) == 425 then outputChatBox ( getPlayerName( killer )..' has killed '..getPlayerName( source )..' with his hunter.' ) end end end end addEventHandler ( "onPlayerWasted", root, kill ) Updated. You need for race gm?
  6. Kenix

    Gravity Problem

    https://community.multitheftauto.com/index.php?p= ... ils&id=329 https://community.multitheftauto.com/index.php?p= ... ls&id=2458
  7. Из 4-ки. Тоже помню слушал. Классная песенка
  8. Kenix

    Hunter target

    function kill ( ammo, killer, killerweapon, bodypart ) local vehicle = getPedOccupiedVehicle( killer ) if isElement( vehicle ) and getElementModel( vehicle ) == 425 then outputChatBox ( getPlayerName( killer )..' has killed '..getPlayerName( source )..' with his hunter.' ) end end addEventHandler ( "onPlayerWasted", root, kill ) Evil-Cod3r,Your code is wrong. local him = getPlayerName(killer) -- variable killer is nil local me = getPlayerName(source) -- variable source is nil ( source used in event you can read [url=https://wiki.multitheftauto.com/wiki/Predefined_variables_list]https://wiki.multitheftauto.com/wiki/Pre ... ables_list[/url] ) local what = getElementType() -- not use arguments so return false local mta = getElementModel() -- same function kill ( ammo, killer, killerweapon, bodypart) if (what == "vehicle" and mta == 425) then outputChatBox ( "him .. Has Killed .. me with .. what .. mta" ) end end addEventHandler ( "onPlayerWasted", getRootElement(), kill )
  9. Try. local x,y = guiGetScreenSize( ) function headshot ( killer, weapon, bodypart ) if ( killer ) and ( killer ~= source ) then local image = guiCreateStaticImage ( x/5, y/5.8, 399,169, "SAMP"..tostring( math.random( 1,4 ) )..".png", false ) guiStaticImageLoadImage( image, "SAMP"..tostring( math.random( 1,4 ) )..".png" ) setTimer ( guiSetVisible, 4000, 1, image, false ) end end addEventHandler ( "onClientPlayerWasted", localPlayer, headshot ) You forgot 'end'.
  10. http://dev.mysql.com/doc/refman/5.0/en/ ... ivity.html
  11. Explain what you need. I help you.
  12. Kenix

    Hunter target

    denny199,Can you explain better please?
  13. Kenix

    Help pls

    No problem. Do the same but with a resource joinquit. Open folder:mta_folder/server/mods/deathmatch/ Find resource joinquit.zip Open it for example with winrar. Open script files for example with notepad++ : joinquit.lua ( lua expansion ) And paste it: _getPlayerName = getPlayerName function getPlayerName( el ) if isElement( el ) then local name = _getPlayerName( el ) if name then return string.gsub( name, '#%x%x%x%x%x%x', '' ) or name end return false end return false end At the top of the script file.
  14. Eshtiz,showPlayer variable is nil in your script. in function outputChatBox you need use 2 argument is element.But you use showPlayer then outputChatBox function not work , return false. in /debugscript 3 would be shown the errors , but you not use.
  15. Kenix

    Help pls

    Sorry , but i'm not understand Open folder:mta_folder/server/mods/deathmatch/ Find resource killmessages.zip Open it for example with winrar. Open script files for example with notepad++ : killmessages_client.lua/killmessages_server.lua ( lua expansion ) And paste it: _getPlayerName = getPlayerName function getPlayerName( el ) if isElement( el ) then local name = _getPlayerName( el ) if name then return string.gsub( name, '#%x%x%x%x%x%x', '' ) or name end return false end return false end At the top of the script file.
×
×
  • Create New...