Jump to content

Miika

Members
  • Posts

    253
  • Joined

  • Last visited

Everything posted by Miika

  1. Miika

    Help me!

    I edit the "mysterybag" resource. I want the bag to give 100% armor, but its says: "You get (random money) and "false%" armor" The code is: -- You can add more locations -- {x, y, z} local mbag = { {2422.3,-2261.6,16}, {1758.9,-2767.9,1.7}, {2493.3,-951.8,82.25}, {815.7,-1108.2,25.8}, {390.9,-2054.3,13.8}, {-719.05,-1938.8,8.35}, {-625.7,-2249.5,23.05}, {-1812.3,-168.5,18.2}, {-2659.5,1528.05,54.79}, {-1733.76,194.75,3.6}, {-2535.5,40.15,8.5}, {-1804.85,558.45,35.15}, {-752.6,-131.6,65.8}, } function createBag() local random = math.random ( #mbag ) local x, y, z = mbag[random][1], mbag[random][2], mbag[random][3] bag = createPickup( x, y, z, 3, 1550 ) setElementCollisionsEnabled( bag, false ) bl = createBlipAttachedTo(bag,37) outputChatBox( "Rahasäkki on spawnannut!", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createBag) addEventHandler("onPickupHit",root, function ( player ) if ( source ~= bag ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( bag ) destroyElement( bl ) randomMoney = math.random ( 3000, 5000 ) armor = getPedArmor ( 100 ) givePlayerMoney(player,randomMoney) setPedArmor ( player, 100 ) outputChatBox("You get " .. tostring(randomMoney) .."$ and ".. tostring(armor) .."% Armor", player, 0, 250, 0) setTimer( createBag, 90000, 1 ) end ) Sorry my bad english...
  2. Miika

    Help!

    "onPlayerWasted" not working. It change the skin, but it spawn new skin with player spawn.
  3. Miika

    Help!

    I'm noob, but I want make resource that change you skin to CJ, if you join. That code not working: function onJoin() setElementModel(player, 0) outputChatBox("CJ skini vaihdettu automaattisesti", source, 2) end addEventHandler("onPlayerJoin", getRootElement(), onJoin) Sorry I'm sorry for my bad english...
×
×
  • Create New...