Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    question

    You want to give yourself health with a command and output it only to your team mates?
  2. Castillo

    question

    You want to give your team mates health? example: Castillo: Team 1 Evil: Team 1 And if your team is not the same as mine, you can't give health?
  3. Yes, I know, but as he was doing it that way, I didn't want to change it.
  4. local Table = { {1220.068359375, -1314.8447265625, 32.610733032227, 1171.732421875, -1341.1748046875, 31.475393295288} } function Show(player) local x, y, z, lx, ly, lz = unpack(Table[math.random(#Table)]) fadeCamera(player, false, 5) setTimer(setCameraMatrix, 1000, 1, player, x, y, z, lx, ly, lz) setTimer(fadeCamera, 1000, 1, player, true) setTimer(setCameraTarget, 3000, 1, player) end addEventHandler("onPlayerWasted", root, function() Show(source) end)
  5. To edit the 'internal.db' use the account data functions: getAccountData setAccountData Example: addEventHandler("onPlayerLogin",root, function (_, account) setAccountData(account,"adminlevel",0) end ) You can also use the program called: sqlitebrowser, search it on google.
  6. You want to set the camera back to the player? if so use setCameraTarget
  7. Well, you can make a setting in your map and then check it when you use a vehicle change pickup, I made the hard part, you can do the rest .
  8. If I'm right, he's talking about the camera, he want's it to be watching the hospital, not the side of it. @sckatchof: Just move the camera positions. This position is the one I've used on one of my scripts: local Table = { {1214.7238769531, -1323.6098632813, 31.14349937439, 1213.8430175781, -1323.6158447266, 30.670255661011, 0, 70} } function Show(player) fadeCamera(player, true, 5) setTimer(setCameraMatrix, 1000, 1, player, unpack(Table[math.random(#Table)])) setTimer(fadeCamera, 1000, 1, player, true) end addEventHandler("onPlayerWasted", root, function() Show(source) end)
  9. Castillo

    toJSON

    Edikosh: Tene cuidado de no poner mucha informacion junta porque el account data tiene un limit de caracteres.
  10. Yo no te digo que no funciona, el lo dice .
  11. You can't attach a text to a element, but you can draw a 3D text with dxDrawText function. Also, your problem is that you call the render function the same name in every script. P.S: You could make this just in one script using a table, but it would be hard for you.
  12. Castillo

    Peds :s

    Porque no probas el script y lees como funciona?
  13. Esa era la unica idea que tenia, no soy de crear mapas la verdad .
  14. No estoy seguro, pero creo que con esta herramienta: http://mta.dzek.eu/mmove/ podes mover mapas enteros a otra posicion.
  15. Castillo

    Peds :s

    Ese recurso tiene trabajo de: Mecanico Policia Asesino a sueldo Buscador Mercader
  16. Castillo

    Peds :s

    Esta este: https://community.multitheftauto.com/index.php?p= ... ls&id=2484
  17. You forgot to set the skin model argument in createPed. local jobmarker = createMarker ( 1019.2646484375, -1348.587890625, 12.548809051514, "cylinder", 1.3, 255, 255, 153, 15 ) local jim = createPed( 0, 1019.2646484375, -1348.587890625, 13.548809051514, 89 ) -- 0 = CJ skin. setElementDimension( jim, 0 ) setElementData( jim, "talk", 1 ) setElementData( jim, "name", "Jim Clark" ) setPedAnimation ( jim, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, true, false, false ) setElementFrozen(jim, true) function renderRectangle() local screenWidth, screenHeight = guiGetScreenSize() local nSw,nSh = guiGetScreenSize( ) local rootElement = getRootElement() local x,y = guiGetScreenSize() -- Get players resolution. --Draw texts and background dxDrawRectangle ( x/3.4, y/1.6, x/2.13, y/4.2, tocolor ( 0, 0, 0, 150 ) ) dxDrawText(" Jim's Rings Donut Delivery Job",nSw/3, nSh/1.57, nSw, nSh,tocolor(255,255,255,185),0.7,"bankgothic","left","top",false,false,false) dxDrawText("Use /acceptjob to accept this job",nSw/3, nSh/1.47, nSw, nSh,tocolor(255,255,255,185),0.7,"bankgothic","left","top",false,false,false) dxDrawText("/quitjob if this job do not suit you",nSw/3, nSh/1.27, nSw, nSh,tocolor(255,255,255,185),0.7,"bankgothic","left","top",false,false,false) end --Add text on markerHit function jobmarkerHit () addEventHandler("onClientRender",root,renderRectangle) outputChatBox("(( Jim's Rings Donut Delivery Job ))", thePlayer, 255, 153, 0) end addEventHandler( "onClientMarkerHit", jobmarker, jobmarkerHit ) --Hide dxDrawings upon markerLeave function jobmarkerLeave () removeEventHandler("onClientRender",root,renderRectangle) end addEventHandler( "onClientMarkerLeave", jobmarker, jobmarkerLeave ) --acceptjob command while inside marker function useJob() if isElementWithinMarker(localPlayer, jobmarker) then local job = getElementData(localPlayer, "job") if ( job > 0 ) then outputChatBox("You are already employed, please quit your other job first (( /quitjob )).", thePlayer, 0, 255, 0, 0) else triggerServerEvent("acceptJob", localPlayer, 7) outputChatBox("You are now employed at Jim's Rings Donut Delivery's.", thePlayer, 0, 190, 0, 0) end end end addCommandHandler("acceptjob", useJob)
  18. Castillo

    Peds :s

    ElMota: No te recomiendo editar el recurso de spawn de 50p, esta programado con OOP (Object Oriented Programming), y aun no tienes la suficiente experiencia para entenderlo.
  19. Thanks . I may upload a decompiled version in future, but not yet.
  20. Ok, I've managed to change the pickup vehicle model and the text over it. -- add this to: race_client.lua: addEvent("changePickupText",true) addEventHandler("changePickupText",root, function (ID, newModel) for index, pickup in pairs(g_Pickups) do if (pickup.type == "vehiclechange" and pickup.id == ID) then pickup.vehicle = newModel pickup.label:text(getVehicleNameFromModel(newModel)) end end end ) -- edit this in race_server.lua: carIDS = { 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 531, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 441, 564, 568, 424, 504, 495, 457, 483, 508, 71, 500, 429, 411, 541, 559, 415, 61, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 594 } addEvent('onPlayerPickUpRacePickup') addEvent('onPlayerPickUpRacePickupInternal', true) addEventHandler('onPlayerPickUpRacePickupInternal', g_Root, function(pickupID, respawntime) if checkClient( false, source, 'onPlayerPickUpRacePickupInternal' ) then return end local pickup = g_Pickups[table.find(g_Pickups, 'id', pickupID)] local vehicle = g_Vehicles[source] if not pickup or not vehicle then return end if respawntime and tonumber(respawntime) >= 50 then table.insert(unloadedPickups, pickupID) clientCall(g_Root, 'unloadPickup', pickupID) TimerManager.createTimerFor("map"):setTimer(ServerLoadPickup, tonumber(respawntime), 1, pickupID) end if pickup.type == 'repair' then fixVehicle(vehicle) elseif pickup.type == 'nitro' then addVehicleUpgrade(vehicle, 1010) elseif pickup.type == 'vehiclechange' then if getElementModel(vehicle) ~= tonumber(pickup.vehicle) then clientCall(source, 'alignVehicleWithUp') setVehicleID(vehicle, pickup.vehicle) setVehiclePaintjobAndUpgrades(vehicle, pickup.paintjob, pickup.upgrades) clientCall(source, 'vehicleChanging', g_MapOptions.classicchangez, tonumber(pickup.vehicle)) setTimer(function (ID) local pickup = g_Pickups[table.find(g_Pickups, 'id', ID)] pickup.vehicle = carIDS[math.random(#carIDS)] triggerClientEvent("changePickupText",root,pickup.id,pickup.vehicle) end, 60000, 1, pickup.id) end end triggerEvent('onPlayerPickUpRacePickup', source, pickupID, pickup.type, pickup.vehicle) end )
  21. This was fixed on version 2.1, I forgot to add it to the change log . Fixed on version 2.2. Fixed on version 2.2. Thanks for reporting these bugs .
  22. local jobmarker = createMarker ( 1192.25390625, -1324.5009765625, 13.3984375, "cylinder", 1.0, 0, 255, 255, 50 ) local x,y = guiGetScreenSize() -- Get players resolution. function renderRectangle() dxDrawRectangle(226.0,97.0,387.0,402.0,tocolor(255,255,255,255),false) end function jobmarkerHit () addEventHandler("onClientRender",root,renderRectangle) outputChatBox("This is a test message", 255, 153, 0) outputChatBox("This is a second test message", 255, 153, 0) end addEventHandler( "onClientMarkerHit", jobmarker, jobmarkerHit ) function jobmarkerLeave () removeEventHandler("onClientRender",root,renderRectangle) end addEventHandler( "onClientMarkerLeave", jobmarker, jobmarkerLeave ) function useJob() if isElementWithinMarker(localPlayer, jobmarker) then local job = getElementData(localPlayer, "job") if ( job > 0 ) then outputChatBox("You are already employed, please quit your other job first (( /quitjob )).", 255, 0, 0) else triggerServerEvent("acceptJob", localPlayer, 7) end end end addCommandHandler("job", useJob)
  23. You want to change the race vehicle change pickups to random?
  24. local jobmarker = createMarker ( 1192.25390625, -1324.5009765625, 13.3984375, "cylinder", 1.0, 0, 255, 255, 50 ) local x,y = guiGetScreenSize() -- Get players resolution. function renderRectangle() dxDrawRectangle(226.0,97.0,387.0,402.0,tocolor(255,255,255,255),false) end function jobmarkerHit () addEventHandler("onClientRender",root,renderRectangle) outputChatBox("This is a test message", 255, 153, 0) outputChatBox("This is a second test message", 255, 153, 0) end addEventHandler( "onClientMarkerHit", jobmarker, jobmarkerHit ) function jobmarkerLeave () removeEventHandler("onClientRender",root,renderRectangle) end addEventHandler( "onClientMarkerLeave", jobmarker, jobmarkerLeave ) function useJob() if isElementWithinMarker(localPlayer, jobmarker) then if exports.global:hasMoney(localPlayer, 50) then exports.global:giveMoney(localPlayer, 50) outputChatBox("You have been given 50$ due to testing purposes.", 0, 255, 0) triggerServerEvent("acceptJob", localPlayer, 7) else outputChatBox("You are not at the right place!", 255, 0, 0) end end end addCommandHandler("job", useJob)
×
×
  • Create New...