Leaderboard
Popular Content
Showing content with the highest reputation on 26/01/19 in all areas
-
¿Todavía sueñas con comenzar una nueva vida? Bueno, ¿qué estás esperando? CL:RP ofrece exclusividad de scripts y mapeos, casi todo listo. ¡Únase a las filas de la LSPD para reducir la tasa de criminalidad en la ciudad! ¡Únete a las filas médicas para salvar vidas! ¿Conviértete en mecánico, doma los carruajes, nada en el polvo y aprende más sobre ellos? ¡Integrar a un miembro de mafiosos (pandilla, mafia)! En CL:RP puedes dejar volar tu imaginación! ¡Únanse a las filas del gobierno, conviértase en un abogado o en el Gobernador de Los Santos! ¡Sé el primero en descubrir un mundo nuevo y una vida nueva! Tu vida comienza ahora mismo en "California Roleplay" - MTASA Server. (beta abierta - todavía en desarrollo) ¡Sé el primero en descubrir tu nueva vida en CALIFORNIA ROLEPLAY : https://discord.gg/b7TEWqU, Únase a nosotros ahora mismo, aquí es donde comienza su nueva vida.1 point
-
السلام عليكم اليوم حابب اقلكم ابيكم كلكم تجون سيرفري واتمني تزوروني كلكم تنوروني وهذا العدد قبل ساعة ايبي السيرفر : mtasa://46.105.250.205:26058 وسيتم وضع بعض الصور من السيرفر في نفس هذا الموضوع قريب1 point
-
It doesn't tell you which field you selected. dxGetTexturePixels is a very slow process.(unless it is only done once at the start) But feel free to try it your way. I am interested in what you discover on the way.1 point
-
Notes: The car explosion might not look the same, even though it is the same type. (to be honest it looks nicer) You might want to only apply it to the types you want to replace. Damage is disabled for all elements, which includes peds, objects and vehicles. You might need to write the same damage method for those.1 point
-
1 point
-
explosions can't be detected with onClientPlayerWeaponFire My first first step gives you everything you need know for the second step. addEventHandler("onClientExplosion", root, function (x,y,z,theType) createExplosion (x, y, z, theType, true, -1.0, false ) local creator = source -- the one that created the explosion, this doesn't have to be a player. local playerX, playerY, playerZ = getElementPosition(localPlayer) local distance = getDistanceBetweenPoints3D(x, y, z, playerX, playerY, playerZ) end)1 point
-
@majqq The first step would be cancelling this event: https://wiki.multitheftauto.com/wiki/OnClientExplosion x: the X Coordinate of where the explosion was created y: the Y Coordinate of where the explosion was created z: the z Coordinate of where the explosion was created theType: the type of explosion created, Values are: 0: Grenade 1: Molotov 2: Rocket 3: Rocket Weak 4: Car 5: Car Quick 6: Boat 7: Heli 8: Mine 9: Object 10: Tank Grenade 11: Small 12: Tiny The second step, recreating the explosion and disable the damage: https://wiki.multitheftauto.com/wiki/CreateExplosion Optional Arguments makeSound: a boolean specifying whether the explosion should be heard or not. camShake: a float specifying the camera shake's intensity. damaging: a boolean specifying whether the explosion should cause damage or not. And the last step is indeed:https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D For your first iteration you can work with rings. So if distance is closer than: damage = 0 if distance is closer than 30 units damage = damage + 10 if distance is closer than 15 units damage = damage + 30 if distance is closer than 5 units damage = damage + 50 iprint(damage) Later you can do some more advanced math stuff which gives you something similar to GTA.1 point
-
Try this: function CriarPed (thePlayer, command, id, model, dimensao) local sX, sY, sZ = getElementPosition(thePlayer) local ped = createPed(tonumber(model), sX, sY, sZ) local pedID = setElementID (ped, id) local dimensaoP = setElementDimension(ped, dimensao) if pedID and dimensaoP then local qDimensao = getElementDimension(ped) local nomePed = getElementID (ped) outputChatBox (horaJ.. "Criaste um ped chamado " ..corPed.. nomePed.. corMJ.. " com o modelo " ..corPed.. model.. corMJ.." na dimensão " ..corEspaco.. qDimensao.. corMJ.. ".", thePlayer, isR, isG, isB, true) addEventHandler("onPedWasted", ped, pedMorreu) else if isElement(ped) then destroyElement(ped) end outputChatBox(horaE.. "Uso: /criarped [" ..corPed.. "Nome do Ped" ..corErro.. "] [" ..corPed.. "0" ..corErro.. "-" ..corPed.. "312" ..corErro.. "] [" ..corEspaco.. "0" ..corErro.. "-" ..corEspaco.. "65535" ..corErro.. "].", source, isR, isG, isB, true) end end addCommandHandler("criarped", CriarPed) addCommandHandler("cp", CriarPed) function matarPed(player, command, pedID) if pedID and getElementByID(pedID) then killPed( getElementByID(pedID) ) outputChatBox("Mataste") elseif not (getElementByID(pedID)) then outputChatBox("No ped with this id") else outputChatBox("Erro") end end addCommandHandler("matarped", matarPed)1 point
-
1 point
-
شكرا يا اخ رام خطر ببالي فكرة ونجحت addCommandHandler('1', function() local _myPed = createPed(getElementModel(localPlayer),getElementPosition(localPlayer)) setTimer(function() setPedControlState( _myPed , 'fire' , not getPedControlState( _myPed , 'fire' ) ) end,50,0 ) end ) وكدا صار يضرب ويكرر الضرب1 point
-
1 point
-
1 point
-
setTimer(function() setPedControlState( _myPed , 'fire' , true ) end,600,0) Try1 point
-
1 point
-
Thank you very much. I think I've got it. I'll try it whenever I get home.1 point
-
triggerClientEvent ("onPedCriado", thePlayer, ped) function TocarSomPed (ped) Serverside elements are available on clientside. But clientside created elements are not available serverside.1 point
-
1 point
-
1 point
-
Se vc é iniciante, recomendo algo mais simples antes de seguir por esse caminho aí. Pois você vai dar de cara com banco de dados e isso é considerado bem complexo. Sobre criar a tabela, você pode fazer com guiCreateGridList. Sobre deixar o carro girando, você pode fazer com moveObject (usando os parâmetros de rotação, no eixo Z) junto com um setTimer pra ficar reiniciando essa rotação, fazendo o veículo continuar rotacionando eternamente. Sobre salvar o carro quando o player sair ou o servidor parar, é justamente com banco de dados. Mas se você tem coragem pra ir de cara e aprender banco de dados ("Porque aqui tem coragi"), eu sugiro este tutorial maroto:1 point
-
1 point
-
You can use a GUI element: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#Static_Images But the quality will not be the same. Check also rendering with textures, you can boost the performance considerably: https://wiki.multitheftauto.com/wiki/DxCreateTexture1 point
-
Server-side: function Cruzar(source) setPedAnimation(source, "PLAYIDLES", "time") end addCommandHandler("pira", Cruzar) EDIT: Não testei!1 point
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=34791 point
-
0 points