Jump to content

boro

Members
  • Posts

    231
  • Joined

  • Last visited

Everything posted by boro

  1. Hi all, i want use playSound3D function with youtube link is it possible ? And if yes, how ? Thank all for ideas..
  2. boro

    onzombiesapwn help

    Idk what you mean, my previous script work, but why it work for all zombies and not only for one spawned zombie this is what i dont know .. and i try it with ped, zombie, source and still dont work
  3. boro

    onzombiesapwn help

    now it dont work and chatbox dont work too and i try this way but without loop this dont work
  4. Hi i make noob zombie script this script is for set zombie health to 50 if is zombie skin 281 It work good, but if is zombie damaged and is spawned next zombie then old damaged zombie have set 50 health back why ? Please Help addEvent ( "onZombieSpawn", true ) addEventHandler ( "onZombieSpawn", root, function () for _, v in ipairs ( getElementsByType ( "ped" ) ) do if ( getElementModel ( v ) == 281 ) then setElementHealth ( v, 50 ) outputChatBox("noob zombie spawned") end end end )
  5. boro

    give weapon

    ty for reply but this dont work no errors and debug is clear full script function zombiedamaged (killer, weapon, bodypart ) if ( killer and killer == getLocalPlayer() ) then triggerServerEvent("onGreetingtwo",getLocalPlayer(),getLocalPlayer()) end end addEventHandler ( "onClientPedWasted", getRootElement ( ), zombiedamaged ) addEvent("onGreetingtwo",true) addEventHandler("onGreetingtwo",resourceRoot, function(p) giveWeapon(p,31,200) end)
  6. boro

    give weapon

    Hi all is any way to give player weapon from client side i try it with triger triggerServerEvent ( "onGreeting", getLocalPlayer() ) function giveweapon ( ) giveWeapon ( source, 31, 200 ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", resourceRoot, giveweapon ) but it dont work any ideas ?
  7. oh resolved i rename resource name and now it work good But Ty all.
  8. It show this Value: [userdata: 000000A9] And yes i have set extrahealth to 10000 and work it good
  9. i have v defined check it for _, v in ipairs ( getElementsByType ( "ped" ) ) do if ( getElementModel ( v ) == 281 ) then local x, y, z = getElementPosition( v ) if isElementOnScreen( v ) then local X, Y = getScreenFromWorldPosition( x, y, z ) if X then dxDrawRectangle( X - 30, Y - 20, 60, 10, tocolor( 0, 0, 0, 120) ) local health = exports["extra_health"]:getElementExtraHealth(v) local lineLength = 56 * ( health / 100 ) dxDrawRectangle( X - 28, Y - 18, lineLength, 6, tocolor( 255, 0, 0, 100 ) )
  10. Hi all i have problem vith my script i want show progressbar for ped i have set extra healt it work good but if i want check ped health with exported function getElementExtraHealth then it show this warning why ? ERROR:healthbar/1.lua:12: attempt to perform arithmetic on local "health" (a nill value) idk why it show nill value because i have set extrahealth for ped and it work please help this is code dxDrawRectangle( X - 30, Y - 20, 60, 10, tocolor( 0, 0, 0, 120) ) local health = exports["extra_health"]:getElementExtraHealth(v) local lineLength = 56 * ( health / 10000 ) -- line 12 dxDrawRectangle( X - 28, Y - 18, lineLength, 6, tocolor( 255, 0, 0, 100 ) )
  11. this delete moneys for all players on server function deletemoney() for _, player in ipairs(players) do local account = getPlayerAccount(player) local money = getPlayerMoney (player) setAccountData(account, "Money", 0) end end addCommandHandler("deletemoney", deletemoney)
  12. boro

    Question

    try this addEventHandler ( "onClientPlayerWasted", root, function () local x,y,z = getElementPosition( source ) local camerax, cameray, cameraz = getCameraMatrix() setCameraMatrix ( x, y, z, camerax, cameray, cameraz ) end )
  13. boro

    Mutiple skins

    Oh you have txd,dff skin ok try this and set your skin names to bobcat1.txt, bobcat1.dff and bobcat2.txt,bobcat2.dff function randomwehicle ( ) if bobcatone then txd = engineLoadTXD ( "bobcat1.txd" ) engineImportTXD ( txd, 422 ) -- here set your wehicleid dff = engineLoadDFF("bobcat1.dff", 422) engineReplaceModel(dff, 422) bobcatone = false local newwehicle = createVehicle ( wehicleID, posX, posY, posZ ) -- here set your vehicle id and spawn position warpPedIntoVehicle ( source, newwehicle ) else txd = engineLoadTXD ( "bobcat2.txd" ) engineImportTXD ( txd, 422 ) -- here set your wehicleid dff = engineLoadDFF("bobcat2.dff", 422) engineReplaceModel(dff, 422) bobcatone = true local newwehicle = createVehicle ( wehicleID, posX, posY, posZ ) -- here set your vehicle id and spawn position warpPedIntoVehicle ( source, newwehicle ) end end addEventHandler ( "onPlayerSpawn", getRootElement(), randomwehicle )
  14. boro

    Mutiple skins

    try this skintable = { "skinname.txd", "skinname.txd", "skinname.txd", "skinname.txd" } -- here set your skin names function randomwehicle ( ) txd = engineLoadTXD ( "skintable[math.random (#skintable)]" ) engineImportTXD ( txd, vehicleID ) -- here set your wehicleid local newwehicle = createVehicle ( wehicleID, posX, posY, posZ ) -- here set your vehicle id and spawn position warpPedIntoVehicle ( source, newwehicle ) end addEventHandler ( "onPlayerSpawn", getRootElement(), randomwehicle )
  15. Then i dont help you. Because i need your code with this song for example how work. Now i dont know nothing.
  16. What you mean ? You want stop currrent map music when is map finished or end ? it is for race map?
  17. boro

    [Help] area name

    try this local areas = { ['Last Dime Motel'] = { x = '1876.0206298828', y = '639.92822265625', z = '0', width = '110', height = '120', size= '155' }; ['Come-A-Lot'] = { x = '2088.8642578125', y = '983.38934326172', z = '0', width = '250', height = '195', size= '155' }; ['Redsands West'] = { x = '1297.0888671875', y = '2101.5236816406', z = '0', width = '100', height = '100', size= '155' }; ['Roca Escalante'] = { x = '2294.7055664063', y = '2242.7463378906', z = '0', width = '320', height = '200', size= '155' }; ['Pilgrim'] = { x = '2439.5773925781', y = '1484.2821044922', z = '0', width = '170', height = '120', size= '155' }; ['LVA Freight Depot'] = { x = '1576.5826416016', y = '883.79443359375', z = '0', width = '180', height = '250', size= '155' }; ['Las Venturas Airport'] = { x = '1256.7247314453', y = '1211.0180664063', z = '0', width = '360', height = '450', size= '155' }; ['t'] = { x = '1121.9184570313', y = '2723.6286621094', z = '0', width = '410', height = '130', size= '155' }; ['El Quebrados'] = { x = '-1624.2315673828', y = '2546.4689941406', z = '0', width = '200', height = '160', size= '155' }; ['Ocean Flats'] = { x = '-2800.4970703125', y = '-203.62327575684', z = '0', width = '200', height = '460', size= '155' }; ['Hashbury'] = { x = '-2586.9035644531', y = '-207.01741027832', z = '0', width = '160', height = '250', size= '155' }; ['Garcia'] = { x = '-2410.7312011719', y = '-201.14291381836', z = '0', width = '200', height = '460', size= '155' }; ['Doherty'] = { x = '-2166.2292480469', y = '-63.644058227539', z = '0', width = '160', height = '310', size= '155' }; ["King's"] = { x = '-2155.6318359375', y = '329.27984619141', z = '0', width = '160', height = '240', size= '155' }; ['Calton Heights'] = { x = '-2248.1584472656', y = '748.20239257813', z = '0', width = '238', height = '530', size= '155' }; ['City Hall'] = { x = '-2812.9992675781', y = '296.84313964844', z = '0', width = '200', height = '160', size= '155' }; ['Santa flora'] = { x = '-2738.5361328125', y = '478.66021728516', z = '0', width = '200', height = '320', size= '155' }; ['Financial'] = { x = '-1870.4908447266', y = '848.87469482422', z = '0', width = '152', height = '320', size= '155' }; ['Ganton'] = { x = '2226.7885742188', y = '-1835.9097900391', z = '0', width = '320', height = '200', size= '155' }; ['Willowfield'] = { x = '1977.2436523438', y = '-2145.0498046875', z = '0', width = '560', height = '280', size= '155' }; ['Idlewood'] = { x = '1824.6007080078', y = '-1837.0328369141', z = '0', width = '400', height = '280', size= '155' }; ['Los Flores'] = { x = '2583.2983398438', y = '-1389.1251220703', z = '0', width = '140', height = '250', size= '155' }; ['Glen Park'] = { x = '1840.0902099609', y = '-1447.9831542969', z = '0', width = '140', height = '120', size= '155' }; ['East Los Santos'] = { x = '2274.6704101563', y = '-1549.1168212891', z = '0', width = '300', height = '390', size= '155' }; ['Marina'] = { x = '668.58984375', y = '-1734.75390625', z = '0', width = '90', height = '270', size = '155' }; ['Los Santos International'] = { x = '2056.7900390625', y = '-2412.576171875', z = '0', width = '100', height = '100', size = '155' }; ['The High Roller'] = { x = '1837.7880859375', y = '1283.57421875', z = '0', width = '200', height = '150', size = '155' }; } local theArea = { } function disableGTAZones() setPlayerHudComponentVisible(source, "area_name", false) end addEventHandler("onPlayerJoin", root, disableGTAZones) function createNewZones() for _, area in pairs ( areas ) do theArea[_] = createColCuboid ( area.x, area.y, area.z, area.width, area.height, area.size ); outputChatBox("".._.."") setElementData(theArea[_], "zone_name", _) end end addEventHandler("onResourceStart", root, createNewZones) addEventHandler( "onColShapeHit", theArea[_], function(hitPlayer,thePlayer) if getElementType(hitPlayer)=="player" then outputChatBox("Puto", source) outputChatBox(getElementData(theZone, "zone_name").." zone entered!", source, 255, 0, 0) end end)
  18. onClientDXMouseEnter onClientDXClick
  19. function checkShipment(button, state, thePlayer) local level = getElementData(thePlayer, "level") if (thePlayer == bCheck ) and (thePlayer == left) then
  20. boro

    HELP

    its not possible its possible only with triggerClientEvent
  21. boro

    animation block

    Hi all is any way to freeze this animation setPedAnimation( localPlayer, "ped", "IDLE_tired", 1, true, false, false, true) because if i set this animation and press jump then this animation is disturbed
×
×
  • Create New...