Jump to content

Search the Community

Showing results for tags '[help]'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





  1. hi guys Can you tell me why I got "warning" from these little codes? warning : Expected numbers,got non-convertable string.This warning may be an error in future versions. function showSpecificSlotWindow( slotid ) local slotname = getVehicleUpgradeSlotName( slotid ) if type( slotid ) == 'string' then slotname = slotid end local upgrades = getVehicleCompatibleUpgrades( moddingVeh ) if not hideSubToo then guiSetText( upgradeGUI.wnd, slotname ) showNewSub = false else addEventHandler( "onClientRender", getRootElement()
  2. Hello friends, I checked forum topics for how to make private group skins but creating private group's skins topics are always unfinished.I'm just trying a simple way.The skin of the "SEALS" group should change when I start the resource.So I used a very simple code, but it had no effect.What can I do about it?Can someone help me ? thanks. function ReplaceSkin(player) if (player and isElement(player) and getElementType(player)) == "player" then if getElementData(player,'Group') == 'Seals' then txd = engineLoadTXD ( "SL.txd" ) engineImportTXD ( txd, 181
  3. I want this sound to play only in the cities that are there.But even when I enter las venturas or los santos, the sound does not stop.can someone help me ? cities = { ["Bone County"] = true, ["Red County"] = true, ["Tierra Robada"] = true, ["Flint County"] = true, ["Whetstone"] = true, } function change_weather() local x,y,z = getElementPosition(localPlayer) local city = getZoneName(x,y,z, true) if cities[city] then local sound = playSound("ambiance.mp3",true) else stopSound (sound) end end setTimer(change_weather, 1000, 1)
  4. hi guys, All of my codes are working,except removeEventHandler.What should ı do to remove the video on screen ? I'am really stuck on it.thanks for helps. function getB() loadBrowserURL(source, "https://www.youtube.com/") end addEventHandler("onClientGUIClick",root, function () local browser = guiCreateBrowser(0, 0, 1, 300, false, false, true, bbas) local theBrowser = guiGetBrowser(browser) if source == youbutton then addEventHandler("onClientBrowserCreated", theBrowser,getB) guiSetEnabled ( youbutton, false ) guiSetEnabled ( googlebutton, false ) elseif source == stopbutton then r
  5. Hello MTA World, I prepared something so that the wanted level can be seen on the player's head.but with these codes, I have to have a wanted level to see the text on the head of the player.but I don't want this.I want everyone to see whoever has a wanted level.so what's wrong here? addEventHandler( "onClientRender",root, function( ) local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for k, player in pairs(getElementsByType("player",root, true)) do if(player ~= localPlayer) then local level = getPlayerWantedLevel ( play
  6. it works when I use this event as onPlayerWasted.but the player does not teleport while login.am i using a wrong event? local warps = { { 2,2577.3100585938, -1329.7434082031, 1058.2553710938 }, { 2,2573.6740722656, -1353.0935058594, 1058.2553710938 }, { 2,2581.5959472656, -1343.3308105469, 1054.0562744141 } } addEventHandler( "onPlayerLogin", getRootElement( ), function() local rnd = math.random( 1, #warps ) local level = getPlayerWantedLevel ( source ) if ( level == 1 ) then setPedWeaponSlot ( source, 0 ) fadeCamera(source,false, 1.0) setTimer(fadeCamera, 1000, 1,source,true) setTim
  7. ı wrote something.everything works good.When the player goes to jail for the second time, time comes down and doesn't work.we can remove the jail time text with removeEventHandler when the player gets out of jail, but countdown is still working.and when the player goes to jail for the second time, a bug occurs in countdown.How can I restart the time as the player goes back to prison? I'm really stuck.can you help me please? thanks. local start = getTickCount() local countDown = 20 function render() local now = getTickCount() if now-start > 1000 then countDown = countDown
  8. I want to save the player wanted level, but it doesn't work.can someone help me ? thanks. function onQuit() local acc = getPlayerAccount(source) if not isGuestAccount(acc) then local wantedLevel = getPlayerWantedLevel (source) setAccountData(acc, "wlevel", wantedLevel) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local acc = getPlayerAccount(source) local wantedLevel = getAccountData(acc, "wlevel") setTimer (setPlayerWantedLevel,500,1,acc,wantedLevel) end addEventHandler("onPlayerLogin", ge
  9. The sound still does not play when I enter the cities.what's wrong ? can someone help? cities = { ["Bone County"] = true, ["Tierra Robada"] = true, } addEventHandler('onClientResourceStart', localPlayer, function () local x,y,z = getElementPosition(localPlayer) local city = getZoneName(x,y,z, true) if cities[city] then playSound("sound.mp3",true) end end )
  10. Hello, I'm trying to add text on the ped.everything is good.text appears but when I approach the ped, the error comes from debug. ERROR :[Resources]\missionsped\client.Lua:199: attempt to perform arithmetic on local 'sy' (a nil value) How can ı solve this problem ? function pedText() local x, y, z = getElementPosition( dealer ) --ped position local x2, y2, z2 = getElementPosition(localPlayer) --player position local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if yakinlas < 4 then local x2, y2, z2 = getElementP
  11. Hi all ı want add explosion to helmet zombie.his skin number 44.ı tried with createExplosion (x,y,z, 0) but its not worked.its more important for us please help.what can ı do ? thanks .. function zombiedamaged ( attacker, weapon, bodypart ) if getElementType ( source ) == "ped" then if (getElementData (source, "zombie") == true) then if ( bodypart == 9 ) then helmeted = "no" local zskin = getElementModel ( source ) for k, skin in pairs( helmetzombies ) do if skin == zskin then helmeted = "yes"
  12. How can I turn a texture ON and OFF with just one command?Texture needs to be active when they enter the server.This is what confuses me. addEventHandler('onClientResourceStart', resourceRoot, function() shader = dxCreateShader('shader.fx') terrain = dxCreateTexture('img/road.jpg') dxSetShaderValue(shader, 'gTexture', terrain) engineApplyShaderToWorldTexture(shader, 'cj_rubbish1') engineApplyShaderToWorldTexture(shader, 'sf_junction2') engineApplyShaderToWorldTexture(shader, ':Oroad01_law') engineApplyShaderToWorldTexture(shader, 'des_1line256') engineApplyShaderToWorldTexture(shader, 'con
  13. Hello to everyone. I would appreciate it if friends with experience answer this topic.In the past a lot of people have opened the topic for a good host.but it's been over a lot of time and we really need help.It's hard to manage a server with zombies or peds.Because many players are getting poor performance from the server.(high ping or lowest level FPS) When we buy a host in Europe, it is a problem for players of the Americas.Likewise when we get a host from the continent of america, those in europe are having problems. Can an experienced friend recommend a good host com
  14. I tried a few more events but failed.I just want the health bar to appear when I "aim" on ped.Now health bar looks without aim with gun! how can ı really do that ?Please help someone? function pedHealthbar() for k, peds in pairs(getElementsByType("ped", root, true)) do if getElementData(peds, "type") == "Secur.ped" then target = getPedTarget(peds) if ( target ) then local recBar = dxDrawRectangle(sX+420, sY-600,150, 12, tocolor(0, 0, 0, 200)) local health = getElementHealth(peds) local lineLength = 144 * (health / 100) local healthBar = dxDrawRectangle(sX+423, sY-597
  15. Hi Forum,ı want to say that ı am new in scripting and now ı am starting to try element datas.ı want to add rank in scoreboard acording to the number of levels.ı know ı cant do the codes below.can someone give me an example how can ı do this ? ı just want to show it on the scoreboard.Thank you from now. exports.scoreboard:addScoreboardColumn('Rank') addEventHandler("onPlayerSpawn",root, function() if getElementData(source,"level") >= 1 then setElementData(source, "Rank", "test") elseif getElementData(source,"level") >= 5 then setElementData(source, "Rank", "test1") elseif getEleme
  16. local sX,sY = guiGetScreenSize() local sX,sY = sX*0.05,sY*0.95 font = "default-bold" function healthbar() local plr = localPlayer for k, pedsz in pairs(getElementsByType("ped", root, true)) do if getElementData(pedsz, "zombie") then target = getPedTarget(plr) if (not target) then return false end if (not getElementType(target) == "ped" ) then return false end if (not isElementOnScreen(pedsz)) then return false end dxDrawText("Zombie", sX+460, sY-627, sX+155, sY-19-(32*7), tocolor(0,0,0, 255), 1.5, font, "left", "top") dxDrawText("Zombie", sX+461.5, sY-625.5, sX+153.5, sY-17
  17. Hello, This is a simple rank tag on the players head.but how can ı destroy this tag when riding the vehicle ? this nametag needs to disappear while riding the vehicle.can someone help me ? addEventHandler( "onClientRender",root, function( ) local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do --if(player ~= localPlayer) then tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 30.0 then
  18. O problema que estou enfrentado é que estou conseguindo criar um ped(pedestre), mas não estou conseguindo rotacioná-lo. ped = createPed( 20 , 1847.7277832031 , -1873.6942138672 , 13.578125 , 0.01, false) Obs.: o quinto argumento deve ser um número float, tentei colocar vários outros (do que está no acima), como 0.1, 0.13, 1.5, 1.932 e a rotação não acontece.
  19. ı downloaded gta 4 animations for my server but only local player see the animations.how can ı change local player to 'player'.ı didint put on serverside its not worked.anybody can help me ? local animTable = { ifp = {}, anims = { "abseil", "ARRESTgun", "ATM", "BIKE_elbowL", "BIKE_elbowR", "BIKE_fallR", "BIKE_fall_off", "BIKE_pickupL", "BIKE_pickupR", "BIKE_pullupL", "BIKE_pullupR", "bomber", "CAR_alignHI_LHS", "CAR_alignHI_RHS", "CAR_align_LHS", "CAR_align_RHS", "CAR_closedoorL_LHS", "DAM_armL_frmLT", "DAM_armR_frmBK", "DAM_armR_frmFT",
  20. I want to add name of the 'car owner' on the car.ı maked some codes but not working.my car shop resource owner element data is "owner" but still ı cant add dx tag name on the car.can someone help me ? maybe ı cant see my mistakes. local fontP = dxCreateFont( "normal.ttf", 20 ) local SX,SY = guiGetScreenSize() local px,py = 1366,768 local sx,sy = (SX/px), (SY/py) function drawCarTags() for k, veh in pairs(getElementsByType("vehicle", resourceRoot, true)) do local cx, cy, cz, lx, ly, lz = getCameraMatrix() local px, py, pz = getElementPosition(veh) local dist = getDistanceB
  21. Hello Guys ı was enabled friendlyfire for some tests but now ı deleted friendlyfire.But still teams cant kill each other.and ı maked some codes but still teams cant kill each other.what can ı do for this ? local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do if ( getTeamFriendlyFire ( theTeam ) == true ) then setTeamFriendlyFire ( theTeam, false ) end end
  22. ı want add specific panel for Hells Angels group.but still everyone can open with /grouppanel command.what s my wrong friends ? client : function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('grouppanel', OpenWin) addEvent( "onGreet", true ) addEventHandler( "onGreet", localPlayer, OpenWin ) server : function
  23. Hi Community My codes make sense.when zombies hit the zone they dying but zombies still spawning and 2 seconds later dying in anti zombie zone.ı stuck to it!ı have seen some topics like this,but problems are not solved. what can ı do for disable zombie spawn in these zone ? someone help me ? ı took screenshot :https://pasteboard.co/I5Owj3n.png zones = { { 1102.84851, -2076.73242, 50.39820, 140.31323242188, 86.654296875, 38.136251831055}, { 93.98439, 1797.64380, 10.64063, 183.03248596191, 143.92370605469, 25.82357254028}, {253.78212, 660.28491, -100.31984, 553.6088104248, 391.
  24. I want disable PvP in Las Venturas, San Fierro,Los Santos and ı created some codes.but when ı burn or fall, ı dont lose health.ı just want disable player vs. player(pvp).someone help me ? what is my wrong ? cities = { ["Los Santos"] = true, ["San Fierro"] = true, ["Las Venturas"] = true, } addEventHandler ( "onClientPlayerDamage", root,function( attacker, weapon, bodypart ) local x,y,z = getElementPosition(localPlayer) local city = getZoneName(x,y,z, true) if cities[city] then if getElementType(attacker) == "player" then cancelEvent() end end end)
  25. Hi guys this codes giving money pickup after the ped kill.but ı need make 5 money pickup.how can ı create pickups table ? ı tried but didnt work.someone help me ? thanks function money (theKiller) if (source == nemesiR) then x,y,z = getElementPosition ( nemesiR ) ---get Element position(zombie that dead)position money = createPickup ( x + 1,y,z, 3, 1212,0 ) if money then function GivePlayerMoney (theKiller) givePlayerMoney ( theKiller, 5000 ) destroyElement ( source ) end addEventHandler ( "onPickupHit", money, GivePlayerMoney ) end end return end addEvent( "onBotW
  • Create New...