Jump to content

lucascba

Members
  • Posts

    121
  • Joined

  • Last visited

Everything posted by lucascba

  1. hola me gustaria saber como puedo poner un texto en el mapa de f11 por ej, para localizar jobs o un lugar en determinado, como puedo hacer eso?
  2. Server: function onChatG ( thePlayer, _, ... ) local gangName = getElementData ( thePlayer, "gang" ) if ( gangName and gangName ~= "None" ) then local msg = table.concat ( { ... }, " " ) local nick = getPlayerName ( thePlayer ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "gang" ) == gangName ) then outputChatBox ( "#FF00FF(GC) ".. nick ..": #FFFFFF".. msg, player, 255, 100, 0, true ) end end end end addCommandHandler ( "gc", onChatG ) PD:A Este script lo hizo Lil' G Link: viewtopic.php?f=146&t=52250&p=508942&hilit=gang+chat#p508942 hola me gustaria saber como puedo hacer, que cuando alguien hable por el chat, el color del chat sea del gang, como puedo hacer eso?
  3. Tengo un problema, quise hacerlo con setElementData pero solo ami me pone el setElementData, porque entro con otra cuenta y compro el arma pero no me pone el setElementData, aca dejo una parte. Eso le da el setElementData cuando el jugador compra el arma. function darcolt4 ( ) triggerServerEvent("comprarcolt", localPlayer) setElementData (localPlayer, "Deagle", "Si") guiSetEnabled(GUIEditor.button[1],false) end addEventHandler("onClientGUIClick", GUIEditor.button[1], darcolt4, false) y esto comprueba si tiene el setElementData function coltboton () local deagle = getElementData( localPlayer, "Deagle" ) if deagle == "Si" then guiSetEnabled(GUIEditor.button[1],false) guiSetEnabled(GUIEditor.button[2],true) end end addEventHandler("onClientMarkerHit", markerAmu, coltboton) y aca guarda el setElementData function saveData(player) local account = getPlayerAccount ( player ) if not isGuestAccount ( account ) then setAccountData ( account, "Deagle", getElementData(player, "Deagle") or "No" ) end end local resourceRoot = getResourceRootElement(getThisResource()) addEventHandler ( "onResourceStop", resourceRoot, function ( resource ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do saveData(thePlayer) end end ) addEventHandler("onPlayerLogin", root, function(_, account) local data = getAccountData ( account, "Deagle" ) or "No" setTimer (setElementData, 3000, 1, source, "Deagle", data) end ) function loggedOut() saveData(source) end addEventHandler("onPlayerLogout",getRootElement(),loggedOut) en debugscript3 no me sale ningun error
  4. Como puedo hacer para reparar eso?
  5. No funciona solo suma 1 y se queda alli.
  6. Ok este es mi codigo, Es un mysterybag seria lo mismo que lo del hijack pero con una bolsa, cada vez que el jugador agarre la bolsa le sume +1 en sus stats. Codigo: 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) exports.UIPtexts:output("Una Bolsa Misteriosa ha aparecido en tu mapa conseguila primero y obten algunos premios agradables en ella!", root, 0, 255, 0) end addEventHandler("onResourceStart", resourceRoot,createBag) addEventHandler("onPickupHit",root, function ( player, killer ) if ( source ~= bag ) then return end if ( isPedInVehicle( player ) ) then return end if ( getElementData( player, "Ocupacion" ) == "FBI" ) then else if ( getElementData( player, "Ocupacion" ) == "SAPD" ) then else if ( getElementData( player, "Ocupacion" ) == "SWAT" ) then else if ( getElementData( player, "Ocupacion" ) == "Special Forces" ) then else if ( getElementData( player, "Ocupacion" ) == "Police Officer" ) then else if ( getElementData( player, "Ocupacion" ) == "Medic" ) then else if ( getElementData( player, "Ocupacion" ) == "None" ) then else if ( getElementData( player, "Ocupacion" ) == "Bus Driver" ) then else if ( getElementData( player, "Ocupacion" ) == "Mechanic" ) then else if ( getElementData( player, "Ocupacion" ) == "Pilot" ) then else if ( getElementData( player, "Ocupacion" ) == "Taxi Driver" ) then else if ( getElementData( player, "Ocupacion" ) == "Trucker" ) then return exports.CLtexts:output("Debes Ser Criminal Para Agarrar La Bolsa Misteriosa", localPlayer, 0, 255, 0) end destroyElement( bag ) destroyElement( bl ) randomMoney = math.random ( 1000, 20000 ) randomArmor = math.random( 40, 80 ) setPedArmor ( player, getPedArmor(player) + randomArmor ) outputChatBox("Usted Gano $" .. tostring(randomMoney) .." Y ".. tostring(randomArmor) .."% De Chaleco", player, 0, 250, 0) setTimer( createBag, 90000, 1 ) givePlayerMoney(player,randomMoney) local stat = getElementData(player, "BC") setElementData(player, "BC", stat+1) end end end end end end end end end end end end ) addEventHandler( "onResourceStart",resourceRoot, function( ) outputDebugString( "add Total Kills to scoreboard Return: "..tostring( call( getResourceFromName("dxscoreboard"), "addScoreboardColumn", "BC",root,2, 0.032 ) ) ) end )
  7. mirra te explico mejor, primero que todos los jugadores tengo por defecto 0 "hijacks" entregados, y que cuando entreguen 1 hijack les sume 1 y así si entregan otro que sea 2, y que cuando reconecten eso se guarde, fui un poco mas claro?
  8. Aca hay un ejemplo de un hijack, pero yo tengo otro: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7030
  9. Si yo se eso, pero solo me pone 1 setElementData, lo que yo quiero hacer es que cada vez que entregue el hijack le sume 1 y así sucesivamente, como puedo hacer eso?
  10. hola, me gustaria saber como puedo hacer esto: Tengo un script del hijack y que cada vez que el jugador entregue el hijack se le coloque un "setElementData" para que luego yo use getElementData lo pueda poner en mis stats, me podrian decir como puedo hacer eso? Gracias
  11. Perdon, eso me pasa cuando agrego otra tabla asi: local ShopTable = { [1] = {ID = {{491, 112593}------- 217 ,{540, 133293} ,{401, 312000} ,{546, 155700} ,{505, 141000} ,{500, 140600} ,{463, 165300} ,{492, 145300} ,{547, 142600} ,{586, 169600} ,{467, 134300} ,{479, 124800} ,{404, 109900} ,{410, 94200} ,{471, 59600} ,{418, 30000} }, vPosX = 2134, vPosY = -1170, vPosZ = 28.15, PosX = 2133, PosY = -1149, PosZ = 23.4, CamX = 2134.1, CamY = -1160, CamZ = 35, lookAtX = 2133.3, lookAtY = -1168, lookAtZ = 28}, [2] = {ID = {{516, 181800} ,{458, 185300} ,{580, 181600} ,{421, 180600} ,{527, 166300} ,{581, 215400} ,{409, 174500} ,{585, 169600} ,{474, 157800} ,{419, 153500} ,{436, 159500} ,{545, 153400} ,{466, 166700} ,{529, 150200} ,{550, 143400} ,{468, 166500} }, vPosX = 552, vPosY = -1288, vPosZ = 18, PosX = 562, PosY = -1270, PosZ = 16, CamX = 552, CamY = -1275.82, CamZ = 21.61, lookAtX = 552, lookAtY = -1276.77, lookAtZ = 21.29}, [3] = {ID = {{533, 193100} ,{555, 193400} ,{507, 201200} ,{521, 242500} ,{461, 227500} ,{566, 195500} ,{551, 192700} ,{400, 190400} ,{558, 186600} ,{549, 184800} ,{579, 102000} ,{576, 197400} ,{526, 181400} ,{517, 172300} ,{575, 163200} ,{561, 122100} }, vPosX = 1942.5, vPosY = 2052, vPosZ = 11, PosX = 1946, PosY = 2068, PosZ = 10, CamX = 1930.36, CamY = 2052.78, CamZ = 14.71, lookAtX = 1931.36, lookAtY = 2052.78, lookAtZ = 14.43}, [4] = {ID = {{536, 221300} ,{567, 258000} ,{602, 235100} ,{534, 228300} ,{426, 214600} ,{439, 214600} ,{412, 214600} ,{587, 287200} ,{565, 284900} ,{589, 282600} ,{542, 271200} ,{496, 203900} ,{535, 203900} ,{405, 227900} ,{445, 217300} ,{518, 190000} }, vPosX = -1950, vPosY = 266, vPosZ = 36.2, PosX = -1954, PosY = 299, PosZ = 34, CamX = -1960.18, CamY = 266.06, CamZ = 37.94, lookAtX = -1959.2, lookAtY = 266.06, lookAtZ = 37.73}, [5] = {ID = {{411, 650000} ,{429, 350000} ,{541, 450000} ,{451, 250000} ,{415, 550000} ,{480, 350000} ,{402, 410000} ,{477, 260000} ,{562, 470000} ,{506, 380000} ,{522, 240000} ,{559, 380000} ,{560, 230000} ,{603, 460000} ,{475, 290000} }, vPosX = -1660, vPosY = 1213, vPosZ = 7, PosX = -1634, PosY = 1199, PosZ = 6, CamX = -1648.9, CamY = 1212.27, CamZ = 10.16, lookAtX = -1649.88, lookAtY = 1212.27, lookAtZ = 9.94} [6] = {ID = {{411, 650000} ,{429, 350000} ,{541, 450000} ,{451, 250000} ,{415, 550000} ,{480, 350000} ,{402, 410000} ,{477, 260000} ,{562, 470000} ,{506, 380000} ,{522, 240000} ,{559, 380000} ,{560, 230000} ,{603, 460000} ,{475, 290000} }, vPosX = -1660, vPosY = 1213, vPosZ = 7, PosX = -1634, PosY = 1199, PosZ = 6, CamX = -1648.9, CamY = 1212.27, CamZ = 10.16, lookAtX = -1649.88, lookAtY = 1212.27, lookAtZ = 9.94} } ------301 Ahora si, perdon por confundirme
  12. hola me gustaria que me ayuden con esta tabla me sale un error: local ShopTable = { [1] = {ID = {{491, 112593}------- 217 ,{540, 133293} ,{401, 312000} ,{546, 155700} ,{505, 141000} ,{500, 140600} ,{463, 165300} ,{492, 145300} ,{547, 142600} ,{586, 169600} ,{467, 134300} ,{479, 124800} ,{404, 109900} ,{410, 94200} ,{471, 59600} ,{418, 30000} }, vPosX = 2134, vPosY = -1170, vPosZ = 28.15, PosX = 2133, PosY = -1149, PosZ = 23.4, CamX = 2134.1, CamY = -1160, CamZ = 35, lookAtX = 2133.3, lookAtY = -1168, lookAtZ = 28}, [2] = {ID = {{516, 181800} ,{458, 185300} ,{580, 181600} ,{421, 180600} ,{527, 166300} ,{581, 215400} ,{409, 174500} ,{585, 169600} ,{474, 157800} ,{419, 153500} ,{436, 159500} ,{545, 153400} ,{466, 166700} ,{529, 150200} ,{550, 143400} ,{468, 166500} }, vPosX = 552, vPosY = -1288, vPosZ = 18, PosX = 562, PosY = -1270, PosZ = 16, CamX = 552, CamY = -1275.82, CamZ = 21.61, lookAtX = 552, lookAtY = -1276.77, lookAtZ = 21.29}, [3] = {ID = {{533, 193100} ,{555, 193400} ,{507, 201200} ,{521, 242500} ,{461, 227500} ,{566, 195500} ,{551, 192700} ,{400, 190400} ,{558, 186600} ,{549, 184800} ,{579, 102000} ,{576, 197400} ,{526, 181400} ,{517, 172300} ,{575, 163200} ,{561, 122100} }, vPosX = 1942.5, vPosY = 2052, vPosZ = 11, PosX = 1946, PosY = 2068, PosZ = 10, CamX = 1930.36, CamY = 2052.78, CamZ = 14.71, lookAtX = 1931.36, lookAtY = 2052.78, lookAtZ = 14.43}, [4] = {ID = {{536, 221300} ,{567, 258000} ,{602, 235100} ,{534, 228300} ,{426, 214600} ,{439, 214600} ,{412, 214600} ,{587, 287200} ,{565, 284900} ,{589, 282600} ,{542, 271200} ,{496, 203900} ,{535, 203900} ,{405, 227900} ,{445, 217300} ,{518, 190000} }, vPosX = -1950, vPosY = 266, vPosZ = 36.2, PosX = -1954, PosY = 299, PosZ = 34, CamX = -1960.18, CamY = 266.06, CamZ = 37.94, lookAtX = -1959.2, lookAtY = 266.06, lookAtZ = 37.73}, [5] = {ID = {{411, 650000} ,{429, 350000} ,{541, 450000} ,{451, 250000} ,{415, 550000} ,{480, 350000} ,{402, 410000} ,{477, 260000} ,{562, 470000} ,{506, 380000} ,{522, 240000} ,{559, 380000} ,{560, 230000} ,{603, 460000} ,{475, 290000} }, vPosX = -1660, vPosY = 1213, vPosZ = 7, PosX = -1634, PosY = 1199, PosZ = 6, CamX = -1648.9, CamY = 1212.27, CamZ = 10.16, lookAtX = -1649.88, lookAtY = 1212.27, lookAtZ = 9.94} } ------301 ERROR: Loading script failed CL-Vehiculos/client.lua301: '}' expected (to close '{' at line 217) near '[' Cual es el error? :c
  13. hola me gustaria sabe como puedo hacer que este resource: https://community.multitheftauto.com/in ... ls&id=7330 sea para un solo grupo ACL Gracias.
  14. Ciber, Como puedo hacer que si el player tiene el arma 22 y lo tiene en cualquier slot se acitive esta funcion: function botoncolt ( ) if getPedWeapon(localPlayer) weaponSlot == 22 then guiSetEnabled(GUIEditor.button[2],true) guiSetEnabled(GUIEditor.button[1],false) else guiSetEnabled(GUIEditor.button[2],false) guiSetEnabled(GUIEditor.button[1],true) end end
  15. y que addEventHandler le pongo, porque si le pongo onClientMarkerHit debe tener esa arma cuando entra al marker , me podrías decir como hago?
  16. Sisi, Este Es el server function Dararma(id) local money = getPlayerMoney(source) if ( tonumber(money) >= tonumber(20000) ) then takePlayerMoney ( source, tonumber(20000) ) exports["CLtopbarchat"]:sendClientMessage ( "Has Comprado Una Colt, Costo:$20000", client, 0, 255, 0, true ) else exports["CLtopbarchat"]:sendClientMessage ( "No Tienes Suficiente Dinero Para Comprar Esta Arma", client, 255, 0, 0, true ) end end addEvent("comprarcolt", true) addEventHandler("comprarcolt",root,Dararma) function darcolts(id) giveWeapon ( source , 22,17 ) local money = getPlayerMoney(source) if ( tonumber(money) >= tonumber(50) ) then takePlayerMoney ( source, tonumber(50) ) exports["CLtopbarchat"]:sendClientMessage ( "Has Comprado Balas De Colt, Costo:$50", client, 0, 255, 0, true ) else exports["CLtopbarchat"]:sendClientMessage ( "No Tienes Suficiente Dinero Para Comprar Municion", client, 255, 0, 0, true ) end end addEvent("darcolt", true) addEventHandler("darcolt",root,darcolts) --------------minigun---------------- function Dararmamin(id) local money = getPlayerMoney(source) if ( tonumber(money) >= tonumber(5000000) ) then takePlayerMoney ( source, tonumber(5000000) ) exports["CLtopbarchat"]:sendClientMessage ( "Has Comprado Una Minigun, Costo:$5M", client, 0, 255, 0, true ) else exports["CLtopbarchat"]:sendClientMessage ( "No Tienes Suficiente Dinero Para Comprar Esta Arma", client, 255, 0, 0, true ) end end addEvent("comprarmin", true) addEventHandler("comprarmin",root,Dararmamin) function darminigun(id) giveWeapon ( source , 38,100 ) local money = getPlayerMoney(source) if ( tonumber(money) >= tonumber(1000) ) then takePlayerMoney ( source, tonumber(1000) ) exports["CLtopbarchat"]:sendClientMessage ( "Has Comprado Balas De Minigun, Costo:$1000", client, 0, 255, 0, true ) else exports["CLtopbarchat"]:sendClientMessage ( "No Tienes Suficiente Dinero Para Comprar Municion", client, 255, 0, 0, true ) end end addEvent("darmini", true) addEventHandler("darmini",root,darminigun) No tiene la funciones de todas las armas porque aun no podia hacer Que se quede guardado el guiSetEnabled,pero este es el lado server por ahora. Si necesitas el client te lo paso por PM
  17. Hola me gustaria saber como hago para guardar guiSetEnabled, estoy haciendo un sistema de ammunation y quiero que primero compre un arma determinada y al comprar el arma se active el boton para comprar la municion, me funciono anda perfecto usando guiSetEnabled, pero cuando reconecto se vuelve a estar activado el boton de comprar el arma, miren esto es una parte del Guion: function darcolt2 ( ) guiSetEnabled ( GUIEditor.button[2], true ) ----boton para comprar municion------ guiSetEnabled ( GUIEditor.button[1], false ) -----Boton para comprar el arma----- triggerServerEvent("comprarcolt", localPlayer) end addEventHandler("onClientGUIClick", GUIEditor.button[1], darcolt2, false) Eso es, Como Puedo Hacer Que Se Quede Guardado(Desactivado el boton de Comprar Arma, si es que el jugador ya la compro) ? gracias.
  18. Hola me gustaría saber como como poner un skin sin modificar el original, me explico que al tomar un job se le coloque un skin que yo modifique y ese skin es el 230, bueno cuando el player tome el job se le ponga el skin 230 modificado, pero si yo no tengo el job y tengo el skin 230 no se me ponga el skin modificado. Es posible hacer eso? Saludos Comunidad. espero que me hayan entendido
  19. and groups with this system you can? https://community.multitheftauto.com/index.php?p= ... ls&id=8291
  20. Yeah but I like this system of turf, as I can make it work with this system of groups?
×
×
  • Create New...