Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. jobs = { {jobTitle = "Police Officer", markerX = 1554.0769042969, markerY = -1675.5629882813, markerZ = 15.1953125, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {280, 281, 284}, information = "TEST"}, {jobTitle = "Trucker", markerX = -1743.7244873047, markerY = 36.274353027344, markerZ = 3.5546875, markerColorR = 0, markerColorG = 25, markerColorB = 200, skins = {206}, information = "test"}, }
  2. fr_client.lua / fr_server.lua.
  3. https://wiki.multitheftauto.com/wiki/Scr ... Tutorial_2 That's a tutorial to create a gate which opens with a GUI keypad, is not random generated, you can add that with: math.random
  4. By remove I guess you mean take it, if so, then use: takeWeapon
  5. onPlayerDamage setElementPosition
  6. function setModel(source) Remove 'source' from there, is already defined by it's own.
  7. Que raro, deberia funcionar, el objeto se crea.
  8. De esa manera nunca va a funcionar, porque tendrias que haber creando una tabla con todas las armas, y insertar cada ves que alguien la tira y ahi ponerle otra tabla para poner al jugador al tocar un colshape y luego al usar el comando verificas si esta sobre uno. id = {} id[1] = 331 id[2] = 333 id[3] = 334 id[4] = 335 id[5] = 336 id[6] = 337 id[7] = 338 id[8] = 339 id[9] = 341 id[22] = 346 id[23] = 347 id[24] = 348 id[25] = 349 id[26] = 350 id[27] = 351 id[28] = 352 id[29] = 353 id[32] = 372 id[30] = 355 id[31] = 356 id[33] = 357 id[34] = 358 id[16] = 342 id[17] = 343 id[18] = 344 id[39] = 363 id[41] = 365 id[42] = 366 id[43] = 367 id[14] = 325 id2 = {} id2[331] = 1 id2[333] = 2 id2[334] = 3 id2[335] = 4 id2[336] = 5 id2[337] = 6 id2[338] = 7 id2[339] = 8 id2[341] = 9 id2[346] = 22 id2[347] = 23 id2[348] = 24 id2[349] = 25 id2[350] = 26 id2[351] = 27 id2[352] = 28 id2[353] = 29 id2[372] = 32 id2[355] = 30 id2[356] = 31 id2[357] = 33 id2[358] = 34 id2[342] = 16 id2[343] = 17 id2[344] = 18 id2[363] = 39 id2[365] = 41 id2[366] = 42 id2[367] = 43 id2[325] = 14 weapons = { } onColShape = { } function getWeaponObjectFromID( id_ ) if id_ then object = id[id_] if object then return object else return false end else return false end end function getWeaponObjectFromIDD( idD_ ) if idD_ then object = id2[idD_] if object then return object else return false end else return false end end function createWeaponOnFloor ( id, ammo, x, y, z ) local id = getWeaponObjectFromID ( id ) local object = createObject ( id, x, y, z - 0.9 ) local colshape = createColTube ( x, y, z, 0.5, 0.5 ) table.insert ( weapons, { object, colshape } ) setElementData ( colshape, "WeaponID", id ) setElementData ( colshape, "WeaponAmmo", ammo ) setElementData ( colshape, "TableID", #weapons ) addEventHandler ( "onColShapeHit", colshape, ColShape ) addEventHandler ( "onColShapeLeave", colshape, ColShape ) end addEvent ( "createWeaponOnFloor", true ) addEventHandler ( "createWeaponOnFloor", getRootElement(), createWeaponOnFloor ) function tirararma ( source ) local Arma = getPedWeapon ( source ) local Municion = getPedTotalAmmo ( source ) if takeWeapon ( source, Arma ) then exports.chat:me ( source, "deja algo en el suelo." ) setPedAnimation ( source, "BOMBER", "BOM_Plant", 3000, false ) triggerClientEvent ( source, "getThePosition", source, Arma, Municion, getElementPosition ( source ) ) else outputChatBox ( "No tienes un arma.", getRootElement(), 255, 255, 255, true ) end end addCommandHandler ( "tirararma", tirararma ) function ColShape ( thePlayer ) if ( eventName == "onColShapeHit" ) then onColShape [ thePlayer ] = source else onColShape [ thePlayer ] = nil end end addCommandHandler ( "recogerarma", function ( thePlayer ) local colshape = onColShape [ thePlayer ] if ( colshape and isElement ( colshape ) ) then local detection = isElementWithinColShape ( thePlayer, colshape ) if ( detection ) then local ID = getElementData ( colshape, "WeaponID" ) local Ammo = getElementData ( colshape, "WeaponAmmo" ) local tableID = getElementData ( colshape, "TableID" ) local IIDD = getWeaponObjectFromIDD ( ID ) exports.chat:me ( thePlayer, "recoge algo del suelo." ) setPedAnimation ( thePlayer, "BOMBER", "BOM_Plant", 3000, false ) giveWeapon ( thePlayer, IIDD, Ammo ) if ( isElement ( weapons [ tableID ] [ 1 ] ) ) then destroyElement ( weapons [ tableID ] [ 1 ] ) end if ( isElement ( weapons [ tableID ] [ 2 ] ) ) then destroyElement ( weapons [ tableID ] [ 2 ] ) end else outputChatBox ( "No estás cerca de ningún arma.", thePlayer, 255, 255, 255, true ) end end end )
  9. Then use: onClientPlayerWasted
  10. onPlayerWasted > unbindKey
  11. Just unbind it when you die.
  12. You must make a script to save the played time.
  13. Castillo

    | Fixed |

    Please post the complete script.
  14. Castillo

    | Fixed |

    What's the problem? does it have any error? write "/debugscript 3" in the chat.
  15. Castillo

    | Fixed |

    Thanks But if you can explain How do I use the "end" Please . Remove one of your 'END'.
  16. Castillo

    | Fixed |

    In the server side code you have an extra 'end'.
  17. Is not useless if he wants it for something that requires them.
  18. If you are using the freecam color picker, then that one has 2 check boxes that are for color number choosing, you could add two more.
  19. Have you created it on the same resolution as you are currently using? if so, is the script set as client side?
  20. Because a vehicle's maximum health is 1000%, not 100%.
  21. I couldn't see the rectangle/text, but that could be a resolution problem.
  22. I really don't see a point on changing it, is not something you should change at all. Maybe TG and FFS made their own.
  23. Errors or anything? is the script set as client side?
×
×
  • Create New...