Jump to content

KaMi

Members
  • Posts

    155
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by KaMi

  1. KaMi

    Ghost Mode

    post your final code. Maybe it´s not working because you created a new function to the blip
  2. Hey ! This is a "remake" of my old resource. It contain the classic mysteries from the singleplayer mod, "Misterix Mod" made by Zeb89 & Automan. ----> DOWNLOAD HERE <---- Updates: * General code changed * Added a special reward * Blips removed ( hidden mysteries ) * Mysteries can't swim * Nemesis's weapon changed * Removed Aliens and CJ's mother ( I will add them later ) * Fixed anti-escape error * Classic Models * Independent resource IMAGES:
  3. KaMi

    Adding Objects

    Great idea ! but we can´t add new objects into the game, only replace.
  4. function hydrasm( player ) if isPedInVehicle (player) then addEventHandler ( "onVehicleExit", root, destroy ) local veh = getPedOccupiedVehicle(player) local id = getElementModel ( veh ) if id == 520 then local x,y,z = getElementPosition(player) local smoke = createObject(2780, x, y, z) local smoke2 = createObject(2780, x, y, z) setElementCollisionsEnabled (smoke, false) setElementCollisionsEnabled (smoke2, false) attachElements(smoke, veh,5,-1,-1) attachElements(smoke2, veh,-5,-1,-1) setElementAlpha(smoke, 0) setElementAlpha(smoke2, 0) end end end --addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm ) function destroy() local smokes = getAttachedElements(source) for i,v in ipairs (smokes) do detachElements (v, source) destroyElement(v) end end function bind( player ) bindKey ( player, "H", "down", hydrasm ) -- bind the player's F1 down key-- bind the player's fire down and up control end addEventHandler ( "onVehicleEnter", getRootElement(), bind )
  5. function hydrasm( player ) if isPedInVehicle (player) then local veh = getPedOccupiedVehicle(player) local id = getElementModel ( veh ) if id == 520 then local x,y,z = getElementPosition(player) local smoke = createObject(2780, x, y, z) local smoke2 = createObject(2780, x, y, z) setElementCollisionsEnabled (smoke, false) setElementCollisionsEnabled (smoke2, false) attachElements(smoke, veh,5,-1,-1) attachElements(smoke2, veh,-5,-1,-1) setElementAlpha(smoke, 0) setElementAlpha(smoke2, 0) end end end addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm ) function hydrasm( player ) if isPedInVehicle (player) then local veh = getPedOccupiedVehicle(player) local id = getElementModel ( veh ) if id == 520 then addEventHandler ( "onVehicleExit", root, destroy ) local x,y,z = getElementPosition(player) local smoke = createObject(2780, x, y, z) local smoke2 = createObject(2780, x, y, z) setElementCollisionsEnabled (smoke, false) setElementCollisionsEnabled (smoke2, false) attachElements(smoke, veh,+2,0,0) attachElements(smoke2, veh,-2,0,0) end end end addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm ) function destroy() local smokes = getAttachedElements(source) for i,v in ipairs (smokes) do detachElements (v, source) destroyElement(v) end end
  6. you can attach the object "CJ_SMOKE_MACH" (ID 2780) to the hydra and that going to be a good effect. This is a example : function hydrasm( player ) if isPedInVehicle (player) then local veh = getPedOccupiedVehicle(player) local id = getElementModel ( veh ) if id == 520 then local x,y,z = getElementPosition(player) local smoke = createObject(2780, x, y, z) setElementCollisionsEnabled (smoke, false) attachElements(smoke, veh,0,0,0) --Here you can set the position of the effect (for default the effect going to be in the center of the hydra). end end end addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm )
  7. local marks = { coordenates of your marker, coordenates of your other marker } function markes() markz = createMarker( marks[math.random(1, #marks)], "cylinder", 1.5, 255, 255, 0, 170 ) end
  8. ----------------------------------------------CLIENT------------------------------------------------------------------------------ function wey() local screenW, screenH = guiGetScreenSize() chus = guiCreateWindow((screenW - 294) / 2, (screenH - 345) / 2, 294, 345, "Select your team !", false) guiWindowSetMovable(chus, false) guiWindowSetSizable(chus, false) gridlist = guiCreateGridList(12, 29, 267, 251, false, chus) guiGridListAddColumn(gridlist, "Teams", 0.9) for i = 1, 2 do guiGridListAddRow(gridlist) end guiGridListSetItemText(gridlist, 0, 1, "SWAT Team", false, false) guiGridListSetItemColor(gridlist, 0, 1, 0, 2, 124, 255) guiGridListSetItemText(gridlist, 1, 1, "Military Team", false, false) guiGridListSetItemColor(gridlist, 1, 1, 7, 125, 0, 255) boton = guiCreateButton(86, 296, 129, 38, "Play !", false, chus) showCursor(true) end addEventHandler( "onClientResourceStart", getRootElement(), wey) addEventHandler("onClientGUIClick", guiRoot, function() if source == boton then local row = guiGridListGetSelectedItem(gridlist) if row == 0 then triggerServerEvent("spawnSwat", localPlayer) setTimer ( function() setElementModel ( localPlayer, 285 ) end, 1000, 1 ) playSoundFrontEnd(46) showCursor(false) guiSetVisible(chus, false) addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), swat ) elseif row == 1 then triggerServerEvent("spawnMilit", localPlayer) playSoundFrontEnd(46) setTimer ( function() setElementModel ( localPlayer, 287 ) end, 1000, 1 ) showCursor(false) guiSetVisible(chus, false) addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), milit ) end end end) function swat() setTimer ( function() setElementModel ( localPlayer, 285 ) end, 1000, 1 ) triggerServerEvent("spawnSwat2", localPlayer) playSoundFrontEnd(46) end function milit() setTimer ( function() setElementModel ( localPlayer, 287 ) end, 1000, 1 ) triggerServerEvent("spawnMilit2", localPlayer) playSoundFrontEnd(46) end ------------------------------------------SERVER------------------------------------------------------ addEvent("spawnSwat", true) function swat() spawnPlayer(source, 61.94140625, 1930.7470703125, 17.640625) fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("spawnSwat", getRootElement(), swat) addEvent("spawnMilit", true) function military() spawnPlayer(source, 187.92578125, 1909.6396484375, 17.66947555542) fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("spawnMilit", getRootElement(), military) addEvent("spawnSwat2", true) function swat2() spawnPlayer(source, 61.94140625, 1930.7470703125, 17.640625) fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("spawnSwat2", getRootElement(), swat2) addEvent("spawnMilit2", true) function swat2() spawnPlayer(source, 187.92578125, 1909.6396484375, 17.66947555542) fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("spawnMilit2", getRootElement(), swat2)
  9. Probablemente sea problema de tu mtaserver.conf
  10. En tu escritorio, aprieta "Windows ( El Botón ) + R y te aparecerá una ventana en la que tendrás que escribir "cmd", ahí arrastras tu mta a la ventana negra, dejas un espacio y escribes "/NCRC". Si no entendiste, acá te dejo un tutorial ( No es de mta, pero es el mismo problema con la misma solución ) : Perdón, no era ese. Era este
  11. function quitcar(player) local veh = getPedOccupiedVehicle(player) destroyElement(veh) end addEventHandler ( "onPlayerQuit", getRootElement(), quitcar )
  12. Con respecto a poder caminar con la animación, si te refieres a que el usuario tenga la libertad de poder moverse mientras habla por teléfono, puedes usar esta función : function asd(player) setPedAnimation(player,"ped","phone_talk",0,true,true,false,true) end addCommandHandler( "anim", asd ) NOTA : Si quieres editar la función, tendrás que buscar una animación que cumpla con los requisitos, o sea, que deje la posibilidad de mover al jugador mientras esta se usa. Para parar una animación que está en progreso, tendrás que usar esta función : setPedAnimationProgress Suerte
  13. Eso probablemente sea porque no instalaste correctamente el gta sa. Prueba reinstalandolo y asegurándote de seguir todos los pasos.
  14. KaMi

    Help

    use that function and make a table with the country´s. country = { ["IT"]="Italy", ["MX"]="Mexico", ["SA"]="SAUDI ARBIA", ["PK"]="Pakistan", ["AF"]="Afghanistan", ["DZ"]="Algeria", ["AS"]="American samoa", ["AU"]="Australlia", ["AO"]="Anqola", ["AI"]="Anquilla", ["AQ"]="Antarctica", ["AG"]="Antigua and Barbuda", ["AR"]="Argentina", ["AM"]="Armenia", ["AW"]="Aruba", ["AT"]="Austria", ["AZ"]="Azerbaijan", ["BS"]="Bahamas", ["BH"]="Bahrain", ["BD"]="Bangladesh", ["BB"]="Barbados", ["BY"]="Belarus", ["BE"]="Belgium", ["BZ"]="Belize", ["BJ"]="Benin", ["BM"]="Bermuda", ["BT"]="Bhutan", ["BO"]="Bolivia", ["BA"]="Bosnia", ["BH"]="Herzegovina", ["BW"]="Botswana", ["BR"]="Brazil", ["IO"]="British Indian Ocean Territory", ["VG"]="British Virgin Islands", ["BN"]="Brunei", ["BG"]="Bulgaria", ["BF"]="Burkina Faso", ["MM"]="Burma (Myanmar)", ["BI"]="Burundi", ["KH"]="Cambodia", ["CM"]="Cameroon", ["CA"]="Canada", ["CV"]="Cape Verde", ["KY"]="Cayman Islands", ["CF"]="Central African Republic", ["TD"]="Chad", ["CL"]="Chile", ["CN"]="China", ["CX"]="Christmas Island", ["CC"]="Cocos (Keeling) Islands", ["CO"]="Colombia", ["KM"]="Comoros", ["CK"]="Cook Islands", ["CR"]="Costa Rica", ["HR"]="Croatia", ["CU"]="Cuba", ["CY"]="Cyprus", ["CZ"]="Czech Republic", ["CD"]="Democratic Republic of the Congo", ["DK"]="Denmark", ["DJ"]="Djibouti", ["DM"]="Dominica", ["DO"]="Dominican Republic", ["EC"]="Ecuador", ["SV"]="El Salvador", ["GQ"]="Equatorial Guinea", ["ER"]="Eritrea", ["EE"]="Estonia", ["ET"]="Ethiopia", ["FK"]="Falkland Islands", ["FO"]="Faroe Islands", ["FJ"]="Fiji", ["FI"]="Finland", ["FR"]="France", ["PF"]="French Polynesia", ["GA"]="Gabon", ["GM"]="Gambia", ["GE"]="Georgia", ["DE"]="Germany", ["GH"]="Ghana", ["GI"]="Gibraltar", ["GR"]="Greece", ["GL"]="Greenland", ["GD"]="Grenada", ["GU"]="Guam", ["GT"]="Guatemala", ["GN"]="Guinea", ["GW"]="Guinea-Bissau", ["GY"]="Guyana", ["HT"]="Haiti", ["VA"]="Holy See (Vatican City)", ["HN"]="Honduras", ["HK"]="Hong Kong", ["HU"]="Hungary", ["IS"]="Iceland", ["IN"]="India", ["ID"]="Indonesia", ["IR"]="Iran", ["IQ"]="Iraq", ["IE"]="Ireland", ["IM"]="Isle of Man", ["IL"]="Israel", ["IT"]="Italy", ["CI"]="Ivory Coast", ["JM"]="Jamaica", ["JP"]="Japan", ["JE"]="Jersey", ["JO"]="Jordan", ["KZ"]="Kazakhstan", ["KE"]="Kenya", ["KI"]="Kiribati", ["KO"]="Kosovo", ["KW"]="Kuwait", ["KG"]="Kyrgyzstan", ["LA"]="Laos", ["LV"]="Latvia", ["LB"]="Lebanon", ["LS"]="Lesotho", ["LR"]="Liberia", ["LY"]="Libya", ["LI"]="Liechtenstein", ["LT"]="Lithuania", ["LU"]="Luxembourg", ["MO"]="Macau", ["MK"]="Macedonia", ["MG"]="Madagascar", ["MW"]="Malawi", ["MY"]="Malaysia", ["MV"]="Maldives", ["ML"]="Mali", ["MT"]="Malta", ["MH"]="Marshall Islands", ["MR"]="Mauritania", ["MU"]="Mauritius", ["YT"]="Mayotte", ["MX"]="Mexico", ["FM"]="Micronesia", ["MD"]="Moldova", ["MC"]="Monaco", ["MN"]="Mongolia", ["ME"]="Montenegro", ["MS"]="Montserrat", ["MA"]="Morocco", ["MZ"]="Mozambique", ["NA"]="Namibia", ["NR"]="Nauru", ["NP"]="Nepal", ["NL"]="Netherlands", ["AN"]="Netherlands Antilles", ["NC"]="New Caledonia", ["NZ"]="New Zealand", ["NI"]="Nicaragua", ["NE"]="Niger", ["NG"]="Nigeria", ["NU"]="Niue", ["NI"]="Norfolk Island", ["KP"]="North Korea", ["MP"]="Northern Mariana Islands", ["NO"]="Norway", ["OM"]="Oman", ["PK"]="Pakistan", ["PW"]="Palau", ["PA"]="Panama", ["PG"]="Papua New Guinea", ["PY"]="Paraguay", ["PE"]="Peru", ["PH"]="Philippines", ["PN"]="Pitcairn Islands", ["PL"]="Poland", ["PT"]="Portugal", ["PR"]="Puerto Rico", ["QA"]="Qatar", ["CG"]="Republic of the Congo", ["RO"]="Romania", ["RU"]="Russia", ["RW"]="Rwanda", ["BL"]="Saint Barthelemy", ["SH"]="Saint Helena", ["KN"]="Saint Kitts and Nevis", ["LC"]="Saint Lucia", ["MF"]="Saint Martin", ["PM"]="Saint Pierre and Miquelon", ["VC"]="Saint Vincent and the Grenadines", ["WS"]="Samoa", ["SM"]="San Marino", ["ST"]="Sao Tome and Principe", ["SA"]="Saudi Arabia", ["SN"]="Senegal", ["RS"]="Serbia", ["SC"]="Seychelles", ["SL"]="Sierra Leone", ["SG"]="Singapore", ["SK"]="Slovakia", ["SI"]="Slovenia", ["SB"]="Solomon Islands", ["SO"]="Somalia", ["ZA"]="South Africa", ["KR"]="South Korea", ["ES"]="Spain", ["LK"]="Sri Lanka", ["SD"]="Sudan", ["SR"]="Suriname", ["SJ"]="Svalbard", ["SZ"]="Swaziland", ["SE"]="Sweden", ["CH"]="Switzerland", ["SY"]="Syria", ["TW"]="Taiwan", ["TJ"]="Tajikistan", ["TZ"]="Tanzania", ["TH"]="Thailand", ["TL"]="Timor-Leste", ["TG"]="Togo", ["TK"]="Tokelau", ["TO"]="Tonga", ["TT"]="Trinidad and Tobago", ["TN"]="Tunisia", ["TR"]="Turkey", ["TM"]="Turkmenistan", ["TC"]="Turks and Caicos Islands", ["TV"]="Tuvalu", ["UG"]="Uganda", ["UA"]="Ukraine", ["AE"]="United Arab Emirates", ["GB"]="United Kingdom", ["US"]="United States", ["UY"]="Uruguay", ["VI"]="US Virgin Islands", ["UZ"]="Uzbekistan", ["VU"]="Vanuatu", ["VE"]="Venezuela", ["VN"]="Vietnam", ["WF"]="Wallis and Futuna", ["WB"]="West Bank", ["EH"]="Western Sahara", ["YE"]="Yemen", ["ZM"]="Zambia", ["ZW"]="Zimbabwe" }
  15. KaMi

    Help Scale

    when you set the scale, you can´t set the colision but you can add an other object and use this function with the other object ( that going to add a colision depending the normal scale of the other object ) setElementAlpha(theotherobject, 0)
  16. local uMainGate = createObject ( 980, 1214.0751953125, -2037.2841796875, 67.3203125, 0, 0.24169921875, 89.741821289063 ) local uColShape = createColCircle ( 1213.7659912109, -2042.3292236328, 10, 10 ) setElementDoubleSided(uMainGate, true); -- ------------------------------------------------------------------------------------------------------------------------------ function open () moveObject ( uMainGate, 1500 , 1213.7340087891, -2049.1142578125, 66.699996948242 ) end function closer() moveObject ( uMainGate, 2000, 1214.0751953125, -2037.2841796875, 67.3203125 ) end -- ------------------------------------------------------------------------------------------------------------------------------ addEventHandler ( "onColShapeHit", uColShape, open) addEventHandler ( "onColShapeLeave", uColShape, closer) -- ------------------------------------------------------------------------------------------------------------------------------ is this what you are looking for?
  17. function lockcar ( thePlayer ) playervehicle = getPedOccupiedVehicle ( thePlayer ) -- define 'playervehicle' as the vehicle the player is in local id = getElementModel ( playervehicle ) if id == 601 then -- if a player is in a vehicle if isVehicleLocked ( playervehicle ) then -- and if the vehicle is already locked setVehicleLocked ( playervehicle, false ) --unlock it else -- otherwise (if it isn't locked) setVehicleLocked ( playervehicle, true ) -- lock it playSoundFrontEnd ( thePlayer, 46 ) --optional argument end end end function bindLockOnSpawn ( theSpawnpoint ) -- when a player spawns bindKey ( source, "l", "down", lockcar ) -- bind the 'l' key to the 'lockcar' function end addEventHandler ( "onPlayerSpawn", getRootElement(), bindLockOnSpawn ) when you respawn ( /kill ) the key going to be binded and what happend with the fire of tank?
  18. KaMi

    vehiclefix

    local fixer = createMarker(2064.396484375, -1831.638671875, 12, 'cylinder', 2.0, 255, 0, 0, 150) -- this going to create a marker function tuto( player ) local veh = getPedOccupiedVehicle(player) -- this going to detect the car fixVehicle(veh) --this going to repair the car playSoundFrontEnd ( player, 46 ) --Optional Argument ( this going to play a sound ) end addEventHandler( "onMarkerHit", fixer, tuto ) --this is the event removeWorldModel(5422,1000,2071.8955078125, -1831.046875, 13.554534912109) --this is a optional argument but can be useful if you want garages like single player
  19. KaMi

    Object delete

    removeWorldModel(1260,100,521.37902832031, -1307.7121582031, 30.470401763916) this works. they are two different models you can do this removeWorldModel(1260,1000,521.37902832031, -1307.7121582031, 30.470401763916) removeWorldModel(6353,1000,521.37902832031, -1307.7121582031, 30.470401763916)
  20. function darDinheiro( player ) local acc = getAccountName(getPlayerAccount(player)) if not isObjectInACLGroup("user."..acc, aclGetGroup("Admin")) then outputChatBox("#0077ffVocê não é um admin para usar esse comando", 255, 255, 255, true) else givePlayerMoney(player, 1000) outputChatBox("#0077ffVocê recebeu dinheiro de " .. getPlayerName(player), player, 255,255,255, true) end end addCommandHandler("dinheiro", darDinheiro)
  21. https://community.multitheftauto.com/index.php?p=resources&s=details&id=14390
  22. You can re-make the gui with this resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=141 and this tutorial
×
×
  • Create New...