Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/20 in all areas

  1. Hey Peeps, this is a Chatbox that is based on using different Tabs for different kind of Chats. Most suitable to servers with multiple arenas. It takes the settings from the Original Chatbox, so it looks different for every players. It automaticall adds a Team tab, if a player has a team. Its possible to create a group tab, where you can invite players to a group chat. Also, its position can be changed using drag and drop. Video: Download: https://community.multitheftauto.com/in ... s&id=10074 Bonsai
    1 point
  2. --Server Side function addPed(thePlayer) local x, y, z = getElementPosition( thePlayer ); x = x + math.cos( math.rad( getPlayerRotation( thePlayer ) ) ) * 2; y = y - math.sin( math.rad( getPlayerRotation( thePlayer ) ) ) * 2; if (thePed) then destroyElement(thePed) end thePed = createPed ( math.random( 10, 270 ), x, y, z) triggerClientEvent ( "followPlayer", Ped, thePlayer, true ) end addCommandHandler ( "ped", addPed ) --Client Side local followTo local follower addEvent("followPlayer", true) addEventHandler("followPlayer", root, function (thePlayer, value) if (isElement(source) and isElement(thePlayer) ) then if (value) then followTo = thePlayer follower = source removeEventHandler( "onClientRender", root, FollowToPlayer) addEventHandler( "onClientRender", root, FollowToPlayer) else removeEventHandler( "onClientRender", root, FollowToPlayer) end end end) function FollowToPlayer() local ped = follower -- الكركتر الي راح تصنعها تمشي وراك local plr = followTo -- الاعب الي هو انت if ped then local x, y, z = getElementPosition( plr ); local px, py, pz = getElementPosition( ped ); local distance = getDistanceBetweenPoints3D( x, y, z, px, py, pz ) if distance < 3.5 then setPedControlState( ped, "forwards", false ); if ( isPedDucked( plr ) ~= isPedDucked( ped ) ) then setPedControlState( ped, "crouch", isPedDucked( getLocalPlayer( ) )); return end else setPedControlState( ped, "forwards", true ); if distance < 6.0 then if isPedDucked( plr ) ~= isPedDucked( ped ) then setPedControlState( ped, "crouch", false ); setPedControlState( ped, "crouch", true ); setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", false ); return else setPedControlState( ped, "walk", true ); setPedControlState( ped, "sprint", false ); end elseif distance < 10.0 then setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", true ); else setPedControlState( ped, "walk", false ); setPedControlState( ped, "sprint", true ); end local X, Y = 0, 0; X = math.abs( x - px ); Y = math.abs( y - py ); faceMe = math.deg( math.atan2( Y , X ) ); if ( x >= px ) and ( y > py ) then -- north-east faceMe = 90 - faceMe elseif ( x <= px ) and ( y > py ) then -- north-west faceMe = 270 + faceMe elseif ( x >= px ) and ( y <= py ) then -- south-east faceMe = 90 + faceMe elseif ( x < px ) and ( y <= py ) then -- south-west faceMe = 270 - faceMe end setPedRotation( ped, faceMe ); setPedLookAt( ped, x, y, z + .5 ); end end end _setPedRotation = setPedRotation function setPedRotation( ped, rot ) return _setPedRotation( ped, 360 - rot ); end خد هاذا الكود كا مثال⁦ و حاول أطبق خطواطه او تحمل مود شرطه منشور و تحاول انك تاخذ فكره من المود غير كدا ماحد راح يقدر يساعدك
    1 point
  3. الشرح غير كامل , يفضل شخص يفصل الموقع تفصيل للمقبلين على البرمجة . - مبادرة جميلة منك , يعطيك العافية !
    1 point
  4. tut , patrick , وشخص ثاني qais jp فاتو يشوفو الابداع هههههههههههههههههههههههههههههههههههّّّّّّّّّّّّّّّّّّّ
    1 point
  5. Alternatively (a simpler solution that doesn't require tracking loaded players) you can simply have the server tell the client the list of peds to mute when the client is ready and asks for it. That is, [client] -> onClientResurceStart -> triggerServerEvent informing server that client is ready -> [server] -> triggerClientEvent with list of zombies -> [client] -> setPedVoice for each zombie received. This fixes zombies not being muted if the event was received before the client was ready, but it won't suppress the warnings about sending events before the client is ready - for that, you will need to track whether the client is ready before triggering the events.
    1 point
  6. ما فيها سي بق + السنايبر فاشل بيها ..
    1 point
  7. The event onClientResourceStart tells the client/player that a resource has been started on his computer. Then you can use triggerServerEvent directly after that to inform the server that a resource has been loaded on a client his computer. By adding these players to a table, you specify which players are loaded: local loadedPlayers = {} loadedPlayers[#loadedPlayers + 1] = player triggerClientEvent ( loadedPlayers, "eventName", resourceRoot) This only matters when an instruction send in the past is relevant momentarily and can't it be predicted without synchronizing with the server. So the instruction is: the server tells a player that a ped has to be muted. But a specific player didn't load his script. So he isn't aware of that instruction. The player loads from this moment his scripts. The following question is: Does this instruction to mute a ped, is relevant for this player? Because the ped isn't muted for him. Based on the reaction on your previous reply, it is a YES. Can this player that didn't receive the instruction, predict the instruction that should have been executed on the ped? A: If all peds have to be muted within the resource. Then yes, you can predict this instruction and disable clientside the voices of all peds of this resource. Note: something similar might have been added to this resource already. addEventHandler("onClientResourceStart", resourceRoot, function () setPedVoice(resourceRoot, "PED_TYPE_DISABLED") -- mute all current peds of this resource. This does not include new created once. end) B: If that is not the case, then I do not have 1,2,3 a solution for you. You need to keep track which peds are muted and which are not.
    1 point
  8. انا جالس علي الجوال وكنت افكر أنه يريد يعدلها القروب متل ما كان مسوي فل توبك الي قبله ??? ما قريت الموضوع
    1 point
  9. يحبيبي المود شغال , بس جربه على شخص
    1 point
  10. Tente criar um arquivo Lua em server side, e coloque isto nele: Aí você pode compilar em LUAC ou o que você quiser... function criarPed ( res ) createPed(config.skin, 1317.6199951172, -1174.9327392578, 23.716522216797) end addEventHandler ( "onResourceStart", getRootElement(), criarPed ) Não vou saber te informar por que não funcionou, por que também não sei kk
    1 point
  11. Utilize esta ferramenta para postar códigos: Fiz um sistema de revista, porém está em gui... Você pode fazer as alterações necessárias para outputChatBox e etc. local arma1 = getPedWeapon (player, 0) local arma2 = getPedWeapon (player, 1) local arma3 = getPedWeapon (player, 2) local arma4 = getPedWeapon (player, 3) local arma5 = getPedWeapon (player, 4) local arma6 = getPedWeapon (player, 5) local arma7 = getPedWeapon (player, 6) local arma8 = getPedWeapon (player, 7) local arma9 = getPedWeapon (player, 8) local arma10 = getPedWeapon (player, 9) local arma11 = getPedWeapon (player, 10) local arma12 = getPedWeapon (player, 11) local arma13 = getPedWeapon (player, 12) if arma1 == 0 then guiSetProperty(GUIEditor.label[4], "Text", "-") else guiSetProperty(GUIEditor.label[4], "Text", getWeaponNameFromID (arma1)) end if arma2 == 0 then guiSetProperty(GUIEditor.label[5], "Text", "-") else guiSetProperty(GUIEditor.label[5], "Text", getWeaponNameFromID (arma2)) end if arma3 == 0 then guiSetProperty(GUIEditor.label[6], "Text", "-") else guiSetProperty(GUIEditor.label[6], "Text", getWeaponNameFromID (arma3)) end if arma4 == 0 then guiSetProperty(GUIEditor.label[7], "Text", "-") else guiSetProperty(GUIEditor.label[7], "Text", getWeaponNameFromID (arma4)) end if arma5 == 0 then guiSetProperty(GUIEditor.label[8], "Text", "-") else guiSetProperty(GUIEditor.label[8], "Text", getWeaponNameFromID (arma5)) end if arma6 == 0 then guiSetProperty(GUIEditor.label[9], "Text", "-") else guiSetProperty(GUIEditor.label[9], "Text", getWeaponNameFromID (arma6)) end if arma7 == 0 then guiSetProperty(GUIEditor.label[10], "Text", "-") else guiSetProperty(GUIEditor.label[10], "Text", getWeaponNameFromID (arma7)) end if arma8 == 0 then guiSetProperty(GUIEditor.label[11], "Text", "-") else guiSetProperty(GUIEditor.label[11], "Text", getWeaponNameFromID (arma8)) end if arma9 == 0 then guiSetProperty(GUIEditor.label[12], "Text", "-") else guiSetProperty(GUIEditor.label[12], "Text", getWeaponNameFromID (arma9)) end if arma10 == 0 then guiSetProperty(GUIEditor.label[13], "Text", "-") else guiSetProperty(GUIEditor.label[13], "Text", getWeaponNameFromID (arma10)) end if arma11 == 0 then guiSetProperty(GUIEditor.label[14], "Text", "-") else guiSetProperty(GUIEditor.label[14], "Text", getWeaponNameFromID (arma11)) end if arma12 == 0 then guiSetProperty(GUIEditor.label[15], "Text", "-") else guiSetProperty(GUIEditor.label[15], "Text", getWeaponNameFromID (arma12)) end if arma13 == 0 then guiSetProperty(GUIEditor.label[16], "Text", "-") else guiSetProperty(GUIEditor.label[16], "Text", getWeaponNameFromID (arma13)) end Provavelmente tem uma forma mais simples de se fazer, mas tenta fazer essa...
    1 point
  12. Olá amigo, tudo bem? Verifique em qual linha está dando este erro, pois o erro que postou é um erro de comparação, por exemplo: if true > 300 then /\ O código não funciona, pois você precisa comparar números com números... Mas enfim, não é essa sua dúvida... Você pode criar um arquivo chamado config.Lua, por exemplo, que seria mais ou menos assim: config = { skin = 215 } e no seu script, seria assim: outputChatBox(config.skin) É um exemplo... Você pode usar onde quiser... Se ficou meio confuso, pode chamar de novo... Aqui tem um tópico que eu mesmo criei recentemente, se tiver dúvidas:
    1 point
  13. Ah, notei meu erro, acabei nem percebendo, desculpe-me.
    1 point
  14. good job , good resources , good ideas . but Zombie gamemode dead !
    1 point
  15. O material precisa ter uma cor específica para fazer o MTA entender que ele é um material de cor do veículo em vez de textura. Cor primária: #85FF00 Cor secundária: #FF00D8 Cor terciária: #00FFFF Se o seu veículo só tem uma cor, deixe o material na cor 1. (#85FF00)
    1 point
  16. We are going to Release Verison 5.0 Soon Wait us
    1 point
  17. Hello, just wanted to give a simple gift to many people who keep having a problem with the LS CityHall flag to either replace it, or delete it from the Map and make a new LS CityHall for MTA. or change the flag texture as the Map Editor doesn't detect it. the same as many other objects. so i am giving you a way to fix this problem. i can make a tutorial if you guys want on how to remove other undetected objects. Object name : LAcityhallTrans_LAn Object model : 4003 HOW TO : 1- go to the map file that has the CityHall Map usually at : C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources\<MapName>\ 2- Enter the <MapName>.map file there with an editor like notepad ( there is only one file has an extension of *.map) 3- in the end of the file add this line : <removeWorldObject id="removeWorldObject (LAcityhallTrans_LAn) (1)" radius="96.110512" interior="0" model="4003" lodModel="4024" posX="1484.36389" posY="-1749.83789" posZ="30.61433" rotX="0" rotY="0" rotZ="0"></removeWorldObject> 4- if the map is already open in your local server, then please reopen the map <MapName> Enjoy
    1 point
  18. outputChatBox ( isPedOnGround ( localPlayer ) and 'yes' or 'no' ) حطه بالسطر باي سطر ويشتغل .
    1 point
  19. سويتوها قصة حانا ومانا وصفحتين ع الفاضي . local Table = { } addCommandHandler ( 'AddSerial' , function ( Player , _ , Serial ) table.insert ( Table , { [ Serial ] = true } ) end ) addCommandHandler ( 'Test' , function ( Player ) if ( Table [ 1 ] [ getPlayerSerial ( Player ) ] ) then outputChatBox ( 'Check' , Player ) end end )
    1 point
  20. لازم تصبر عـ المود لما يكمل تحميل , تقدر تسوي بواحد من الفنكشنات التالية : isTransferBoxActive setTimer
    1 point
  21. local hospitais = { { x, y, z }, { x, y, z }, } function getNewSpawn( player ) local hospitais_ = { } local x, y, z = getElementPosition( player ) for i=1, #hospitais do table.insert( hospitais_, { distance = getDistanceBetweenPoints3D( x, y, z, hospitais[ i ][ 1 ], hospitais[ i ][ 2 ], hospitais[ i ][ 3 ] ), id = i } ) end table.sort( hospitais_, function( a, b ) return a.distance < b.distance end ) local id = hospitais_[ 1 ].id return hospitais[ id ][ 1 ], hospitais[ id ][ 2 ], hospitais[ id ][ 3 ] end --[[ local x, y, z = getNewSpawn( player ) ]]--
    1 point
  22. 0 points
×
×
  • Create New...