Plate
Members-
Posts
938 -
Joined
-
Last visited
Everything posted by Plate
-
Se supone que un numero al igual que Slots
-
Gracias solid otra duda por que los maxsSlots no funcionan y esto de slots si me aparece function getSlots() local slots = getElementData(localPlayer, "Slots") local maxsSlots = getElementData(localPlayer, "maxSlots") guiSetText(texto, "Inventario Lleno") guiLabelSetColor(texto, 255, 0, 0, 255) guiSetText(usedSlot, " "..slots.."") guiSetText(slots, " /"..maxsSlots.."") end me dice esto Bad Argumento guiSetText[ expected gui-element at argument 1 got number "20" pero 20 son los slots no los max slots
-
No aparecen los textos en la grid
-
Hola tengo un problema con este script es que no funciona no tengo idea de por que function checkSkills() local colt = getPedStat ( localPlayer, 69 ) if ( colt >= 40 <= 998 ) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Pistol Skill 3", false, false) elseif (colt < 40 ) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Pistol Skill 2", false, false) local silenced = getPedStat(localPlayer, 70) if ( silenced < 500) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Silenced Skill 2", false, false) elseif ( silenced >= 500 <= 998) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Silenced Skill 3", false, false) end end end addEvent("onClientWeaponShop", true) addEventHandler("onClientWeaponShop", getRootElement(), checkSkills)
-
Eso lo que hace es que puedas sacar armas pero no disparar
-
function getItemInfo() local px, py, pz, tx, ty, tz, dist local px, py, pz = getCameraMatrix() for _, v in ipairs(getElementsByType("object")) do if getElementData(v, "Municion") then local tx, ty, tz = getElementPosition( v ) local dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 30.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getElementPosition( v ) local x,y = getScreenFromWorldPosition( sx + 0.9, sy, sz + 0.7 ,100,false ) if x and y then local item = getElementModel(v) outputChatBox(item.."") local distance = getDistanceBetweenPoints3D(px, py, pz, sx, sy, sz) dxDrawText("item: 1234", x, y+10, x, y, tocolor(245,245,245), 0.60 + ( 15 - dist ) * 0.02, "bankgothic" ) dxDrawText("Ammo: 12345", x, y-5, x, y+100, tocolor(245,245,245), 0.60 + ( 20 - dist ) * 0.02, "bankgothic" ) else return end end end end end end end end addEventHandler( "onClientRender",root,getItemInfo)
-
Gracias solid me funciona de 10 te lo agradesco me podrias decir por que esto no anda eto usaba yo para los pickups jaja function getItemInfo() local px, py, pz, tx, ty, tz, dist local px, py, pz = getCameraMatrix() for _, v in ipairs(getElementsByType("object")) do if getElementData(v, "Municion") then local tx, ty, tz = getElementPosition( v ) local dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 30.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getElementPosition( v ) local x,y = getScreenFromWorldPosition( sx + 0.9, sy, sz + 0.7 ,100,false ) if x and y then if (v == 358) then local distance = getDistanceBetweenPoints3D(px, py, pz, sx, sy, sz) dxDrawText("item: 1234", x, y+10, x, y, tocolor(245,245,245), 0.60 + ( 15 - dist ) * 0.02, "bankgothic" ) dxDrawText("Ammo: 12345", x, y-5, x, y+100, tocolor(245,245,245), 0.60 + ( 20 - dist ) * 0.02, "bankgothic" ) else return end end end end end end end addEventHandler( "onClientRender",root,getItemInfo)
-
Estas seguro que las coordenadas estan exactamente bien ? yo pienso que capas las pusistes mal
-
Si lo unico que no destruye el colshape y el arma
-
Nop antes no se destruia el colshape ahora no se destruye el arma y tampoco el colshape
-
Me da error en el destroyElement
-
Ni idea el mismo que el Los Santos infection
-
Hola por que esto no funciona nisiquiera da error function bindStart() for k,v in pairs(getElementsByType("player")) do bindKey(v, "n", "down", pickupWeapon) end end addEventHandler("onResourceStart", getRootElement(), bindStart) function login() for k,v in ipairs(getElementsByType("player")) do bindKey(v, "n", "down", pickupWeapon) end end addEventHandler("onPlayerLogin", getRootElement(), login) function pullItem(item, ammo) local x, y ,z = getElementPosition(source) theWeapon = createObject(358, x, y, z- 1, 70, 0, 0) colshape = createColTube ( x, y, z, 1, 1 ) setElementData(colshape, "Arma", 34) setElementData(colshape, "Municion", ammo) takeWeapon(source, 34) end addEvent("onPlayerPullSniper", true) addEventHandler("onPlayerPullSniper", getRootElement(), pullItem) function pickupWeapon(player) if (source == colshape) then if isElement(colshape) then if isElementWithinColShape(source, colshape) then outputChatBox("/recoger", player, 0, 255, 255) giveWeapon(player, tonumber(getElementData(colshape, "Arma")), tonumber(getElementData(colshape, "Municion"))) destroyElement(source) destroyElement(theWeapon) end end end end addEventHandler("onColShapeHit", getRootElement(), pickupWeapon)
-
Jajajaajajajja
-
Yo reabri mi servidor ~[Zombies Resident Evil Raccoon City]~ ahora tiene: Nuevos skins Nuevos zombies(en proceso) Nuevo sistema de clanes ( con data base ) Nuevo sistema de nafta Nuevo inventario(en proceso) Nueva tienda de armas/skins Nuevo spawn Nuevo sistema de levels Nuevo sistema de eventos Y nose me da paja revisar que tiene IP:mtasa://184.22.125.39:12445
-
No estoy seguro pero no seria algo asi? function camara() local x, y, z = getPedBonePosition(source, 6) setCameraMatrix(localPlayer, x, y, z) end addEventHandler("onClientPreRender", getLocalPlayer(), camara)
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=6140
-
Creo que el primer trigger o el addEvent de serverside
-
ya lo arregle finalmente gracias Solidsnake y Sasuke
-
Ah perdon no lo abia leido Bueno checkee usando outputChatBox(para saber si pasaba lo que tenia que pasar) no obtiene las posiciones nose por que
-
No no funciona nose por que tampoco da error
-
Lee mi edit porfavor PD: Ni idea por que no anda no da error
-
No hace falta el for-loop. function getClanSpawn ( ClanName ) if ( not connection2 ) then return end local query = dbQuery ( connection2, "SELECT * FROM Spawns WHERE ClanName=?", tostring ( ClanName ) ) -- esto nose si esta bien local result, numrows, errmsg = dbPoll ( query, -1 ) if ( type ( result ) == "table" and #result == 0 or not result ) then return false else return result [ 1 ].spawnX, result [ 1 ].spawnY, result [ 1 ].spawnZ end end P.D: MultiKiller: No postees si no sabes. Funciona gracias sasuke y Solid EDIT:Funciona con comando pero con edit no Client: function checkClanSpawn() local row, col = guiGridListGetSelectedItem ( CSGrid ) if ( row and col and row ~= -1 and col ~= -1 ) then local ClanName = guiGridListGetItemText ( CSGrid, row, 1 ) triggerServerEvent("onAdminCheckClanSpawn", localPlayer, ClanName) end end addEventHandler("onClientGUIClick", getSpawn, checkClanSpawn, false) server: function checkClanSpawn(ClanName) local x, y, z = getClanSpawnInfo(ClanName) triggerClientEvent("onClientClanSpawn", getRootElement(), x, y ,z) end addEvent("onAdminCheckClanSpawn", true) addEventHandler("onAdminCheckClanSpawn ", getRootElement(), checkClanSpawn) client: function checked(x, y ,z) guiSetText(SpawnX, tonumber(x)) guiSetText(SpawnY, tonumber(y)) guiSetText(SpawnZ, tonumber(z)) end addEvent("onClientClanSpawn", true) addEventHandler("onClientClanSpawn", getRootElement(), checked)
-
Sasuke agregame a skype(si tenes): codplate14 terminamos el tema por hay EDIT:No da error pero no funciona
-
Creo que si no sabes de data base no podes arreglar un code de data base PD: El problema no es el code sino que nose como hacer para cargar 4 posiciones Code: function getClanSpawn( ClanName ) if ( not connection2 ) then return end local query = dbQuery( connection2, "SELECT * FROM Spawns WHERE ClanName=?", tostring ( ClanName ), tostring(spawnX), tostring(spawnY), tostring(spawnZ) ) -- esto nose si esta bien local result, numrows, errmsg = dbPoll ( query, -1 ) if ( type( result ) == "table" and #result == 0 or not result ) then return false else return true end end