Jump to content

DNL291

Moderators
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. remove it from file fr_server.lua of your resource freeroam addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. '#FFFFFF: #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end )
  2. server showPlayerHudComponent ( thePlayer, component, show ) client showPlayerHudComponent ( component, show )
  3. https://community.multitheftauto.com/index.php?p= ... ls&id=4157
  4. DNL291

    Skin take

    need to cancel the event for other skins not catch the pickup
  5. DNL291

    Skin take

    I do not want to know whether it is single or not. the question is whether it works.
  6. DNL291

    Skin take

    why do you say that? does not work for you? arrange and then only post. as I said please post the error that hinders the functioning of the script, as you say
  7. DNL291

    Skin take

    oh, not needed it. location = getPedWeapon weapon (player) if ( matchingDimension ) then destroyElement( player ) removeEventHandler ( "onPickupHit" , origem, onDeathPickupHit ) giveWeapon( player, weapon, false ) but anyway operate normally.
  8. DNL291

    Skin take

    cancelEvent the pickup will not disappear and the player will not pick up the weapon. destroyElement dont work. then show the error
  9. DNL291

    Skin take

    only the specified skins can get the pickup. and it is working.
  10. DNL291

    Skin take

    you tested? it worked for me
  11. DNL291

    Skin take

    not take anything from your code.
  12. DNL291

    Skin take

    is not what he wants.
  13. DNL291

    JOINSOUND REQ

    function playSoundOnJoin() playSound("mySound.mp3") -- the name of your sound .mp3 end addEventHandler("onClientResourceStart", resourceRoot, playSoundOnJoin) setTimer(playSoundOnJoin, 15000, 1)
  14. we've spent enough information. the rest you can learn in the wiki. https://wiki.multitheftauto.com/wiki/Main_Page
  15. DNL291

    Skin take

    lockSkins = { [287] = true, [121] = true } function onDeathPickupHit( player ) local skin = getElementModel(player) if ( lockSkins[skin] ) then getPickupWeapon( player ) else cancelEvent() outputChatBox("*Só militares podem pegar esta arma.", player, 255, 0, 0) end end function destroyDeathPickup( pickup ) removeEventHandler("onPickupHit", pickup, onDeathPickupHit ) destroyElement( pickup ) end addEventHandler("onPlayerWasted", root, function (totalammo, killer, killerweapon, bodypart) local timeout = 60000 local x, y, z = getElementPosition( source ) local currentweapon = getPedWeapon( source ) local totalammo = getPedTotalAmmo( source ) local pickup = createPickup( x, y, z, 2, currentweapon, timeout, totalammo ) addEventHandler("onPickupHit", pickup, onDeathPickupHit) setTimer( destroyDeathPickup, timeout, 1, pickup ) end) is an example of wiki. https://wiki.multitheftauto.com/wiki/CreatePickup
  16. DNL291

    Skin take

    copy the last code I updated.
  17. and you posted in the wrong place
  18. DNL291

    Skin take

    check if this type server side in the meta.xml
  19. DNL291

    Skin take

    try function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies local skin = getElementModel(source) if ( skin == 287 ) or ( skin == 121 ) and ( seat == 0 ) then local x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z local currentweapon = getPedWeapon ( source ) --get the current weapon of the dead person createPickup ( x, y, z, 2, currentweapon, 10000, totalammo ) else outputChatBox ( "*Você não pode entrar neste veículo.", player, 255, 00, 00) --info in chatbox end end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) --add an event handler for onPlayerWasted
  20. DNL291

    vehcolor

    worked for me when car change,color too when you enter a vehicle, the color is equal to your team. That's what you want?
  21. DNL291

    vehcolor

    make sure the server side in the meta.xml
  22. DNL291

    vehcolor

    dont work worked for me
  23. setVehicleDamageProof( theVehicle, damageProof ) -- theVehicle: The vehicle you wish to make damage proof. damageProof: true is damage proof, false is damageable. addEventHandler("onClientPlayerDamage", root, function () cancelEvent() end)
×
×
  • Create New...