- 
                Posts21,935
- 
                Joined
- 
                Last visited
- 
                Days Won6
Everything posted by Castillo
- 
	function onZombieWasted (killer) if (getElementModel( source) == 264) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted)
- 
	mark1 = createMarker ( 1958.7810058594, -2181.6384277344, 13.546875, "cylinder", 2, 255, 0, 0, 255 ) addEventHandler("onMarkerHit",mark1, function (hitElement) if (getElementType(hitElement) == "player") then outputChatBox("Hola ".. tostring(getPlayerName(hitElement)) .."!", hitElement) end end)
- 
	function( ) local server = dbConnect( "sqlite", "Storedinfo.db" ) local qh = dbQuery(server, "SELECT * FROM vehicles") local results = dbPoll( qh, -1 ) dbFree ( dbQuery ( server,"CREATE TABLE IF NOT EXISTS newTable ( vehicleID, model, posX, posY, posZ, rotX, rotY, rotZ, interior, dimension, respawnPosX, respawnPosY, respawnPosZ, respawnRotX, respawnRotY, respawnRotZ, respawnInterior, respawn, Dimension, numberplate, health, color1, color2, characterID, engineState, locked, lightsState, tintedWindows, fuel")) end)
- 
	Again stolen map: https://community.multitheftauto.com/index.php?p= ... ls&id=3362
- 
	I was talking about the MySQL of MTA Paradise, he tried to put a Lua table with columns into a MySQL table like MTA Paradise does, but it's not that simple.
- 
	That's just a mess. Suggestion: Don't use MTA paradise .
- 
	Talvez sea porque solo cargas los modelos, nunca los remplazas? function onResourceStart() engineImportTXD(engineLoadTXD ( "skins/280.txd" ), 280) engineReplaceModel(engineLoadDFF ( "skins/280.dff", 0 ), 280) end addEventHandler("onClientResourceStart",resourceRoot,onResourceStart)
- 
	Good to know, too bad I miss the beta test. Keep up the good work!
- 
	Any errors? did you set the client side as type="client" in meta.xml? and server side as type="server".
- 
	Stolen map: https://community.multitheftauto.com/index.php?p= ... ls&id=3351 Original: https://community.multitheftauto.com/index.php?p= ... ils&id=856
- 
	function onStartup() myMarker = createMarker( 207.69999694824, 1875.5, 12.39999961853, 'corona', 15.0, 0, 0, 255, 0) gate1 = createObject (969, 209.69999694824, 1875.5, 12.39999961853, 0, 0, 0) addEventHandler( "onMarkerHit", myMarker, MarkerHit1 ) addEventHandler( "onMarkerLeave", myMarker, MarkerLeave1 ) end addEventHandler("onResourceStart", resourceRoot, onStartup) function MarkerHit1( hitElement, matchingDimension ) local account = getPlayerAccount(hitElement) if (account and not isGuestAccount(account)) then local accountName = getAccountName(account) if (isObjectInACLGroup("user."..accountName,aclGetGroup("Admin"))) moveObject ( gate1, 2000, 210.10000610352, 1875.5999755859, 8.8999996185303) end end end function MarkerLeave1( leaveElement, matchingDimension ) local account = getPlayerAccount(leaveElement) if (account and not isGuestAccount(account)) then local accountName = getAccountName(account) if (isObjectInACLGroup("user."..accountName,aclGetGroup("Admin"))) moveObject ( gate1, 2000, 209.69999694824, 1875.5, 12.39999961853) end end end
- 
	Who knows? maybe someone ELSE has the same problem and want's to do it in a different way, nobody know's.
- 
	He also did that to SAUR when we we're getting popular (50-60 players daily). P.S: I was told that the beta started at 17:00 in my country, seems he was wrong -__-.
- 
	We can say... two options is better than one?
- 
	Yeah, well, maybe. I don't care anyway, I never really liked that idea , good luck with the server .
- 
	local criminal = createTeam("Criminal", 255, 0, 0) local positions = { {0, 0, 20}, {1, 0, 20}, {2, 0, 20}, {3, 0, 20}, } function createAmarker (thePlayer) if ( getPlayerTeam(thePlayer) and getPlayerTeam(thePlayer) == criminal ) then local x, y,z = unpack(positions[math.random(#positions)]) createMarker(x, y, z) end end addEventHandler("onVehicleEnter", getRootElement(), createAmarker)
- 
	-- client side: -------------------------- MAP SHOP --------------------------------- mapTab = guiCreateTab("Maps",GUIEditor_TabPanel[1]) mapList = guiCreateGridList(4,5,554,166,false,mapTab) guiGridListSetSelectionMode(mapList,2) buyMap = guiCreateButton(4,173,187,41,"Buy map",false,mapTab) rateMap = guiCreateButton(196,173,121,41,"Rate this map",false,mapTab) rateValue = guiCreateEdit(318,172,51,42,"",false,mapTab) reportMap = guiCreateButton(371,172,186,42,"Report this map",false,mapTab) authorMapColumn = guiGridListAddColumn( mapList, "Author", 0.2 ) mapMapColumn = guiGridListAddColumn( mapList, "Name", 0.5 ) guiGridListSetSortingEnabled ( mapMapColumn, false ) guiGridListAutoSizeColumn( list_avatar, authorMapColumn) triggerServerEvent('getMaps', localPlayer) addEvent('sendMaps', true) addEventHandler('sendMaps', getRootElement(), function(maps) for index, map in ipairs(maps) do local row = guiGridListAddRow(mapList) guiGridListSetItemText(mapList, row, 1, name, false, false) guiGridListSetItemText ( mapList, row, authorMapColumn, map.author, false, false ) guiGridListSetItemText ( mapList, row, mapMapColumn, map.name, false, false ) end end ) addEventHandler('onClientGUIClick', buyMap, function() local row, mapMapColumn = guiGridListGetSelectedItem(mapList) local map = guiGridListGetItemText(mapList, row, mapMapColumn) triggerServerEvent("buyMapFromPanel", getLocalPlayer(), map) end ,false) -- server side: function mapsList() local tempTable = {} for resourceKey, resourceValue in ipairs(getResources()) do local name = getResourceInfo(resourceValue, 'name') local type = getResourceInfo(resourceValue, 'type') local game = getResourceInfo(resourceValue, 'gamemodes') local author = getResourceInfo(resourceValue, 'author') if (type == 'map' and game == 'race') then table.insert(tempTable, {author=author, name=name}) end end triggerClientEvent(source, 'sendMaps', source, tempTable) end addEvent('getMaps', true) addEventHandler('getMaps', getRootElement(), mapsList) function buyMFP(mapname) if g_ForcedNextMap then outputChatBox('#575757[shop]#c8c8c8Next map is '..getMapName(g_ForcedNextMap),source,255,255,0, true) return end local query = #{mapname}>0 and table.concat({mapname},' ') or nil if not query then if g_ForcedNextMap then outputChatBox('#575757[shop]#c8c8c8Next map is '..getMapName(g_ForcedNextMap),source,255,255,0, true) else outputChatBox('#575757[shop]#c8c8c8Next map is not set',source,255,255,0, true) end return end local map, errormsg = findMap(query) if not map then outputChatBox(errormsg, source) return end if lastmap_B == map then outputChatBox('#575757[shop]#c8c8c8That map has been palyed too much recently !',source,255,255,0, true) else g_ForcedNextMap = map local nameAh = getPlayerName(source) local nameAhB = string.gsub(nameAh, "#%x%x%x%x%x%x", "") outputChatBox('#575757[shop]#c8c8c8'..nameAhB..' bought map '..getMapName(g_ForcedNextMap)..' for $3500.',getRootElement(),255,255,0, true) givePlayerMoney(source, -3500) setElementData(source, 'Money', getPlayerMoney(source)) lastmap_B = g_ForcedNextMap end end addEvent('buyMapFromPanel', true) addEventHandler('buyMapFromPanel', getRootElement(), buyMFP)
- 
	If I'm right, this is default water shader example: https://community.multitheftauto.com/index.php?p= ... ls&id=3350 And this: https://community.multitheftauto.com/index.php?p= ... ls&id=3354 is the default parachute script.
- 
	Well, actually the Astronaut job was an idea of one of our members in SAUR, so is not your idea.
- 
	Eso esta mal. function onZombieWasted (killer) local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 6, source ) end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted)
- 
	I don't understand something, do you mean that you can play with two players in the same screen?
- 
	-- meta.xml: "Okumura" type="gamemode" version="1.0" description="Zombie Gamemode By okumura" /> -- script.lua: function crearAutoParaJugador(elJugador, NombreComando, modelo) if (not tonumber(modelo)) then outputChatBox("Inserte un modelo.", elJugador) return end local x,y,z = getElementPosition(elJugador) x = x + 5 local vehiculoCreado = createVehicle(tonumber(modelo), x, y, z) if (not vehiculoCreado) then outputChatBox("Error al crear tu auto.",elJugador) end end addCommandHandler ("crearauto", crearAutoParaJugador)

 
            
        