-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
Muy buen aporte Bc# !
-
if playername and tonumber(money) then local player2 = getPlayerFromName(playername) if player2 then if tonumber(money) < 0 then return end if tonumber(money) ~= 0 then givePlayerMoney(player2,tonumber(money)) takePlayerMoney(player,tonumber(money)) end
-
Stop 'freeroam' resource.
-
I cant log in. It says "Your account may be disabled or blocked or the username/password you entered is incorrect.". Can you request for me please?
-
How can I make to find the nearest coordinates to my player? Ex: I have this table coordinatesTable = { {x, y, z}, {x, y, z} } And I need the nearest coodinates to my player. How can I do? I think getDistanceBetweenPoints3D but I dont know how to do.
-
MTA Team, for the next update of MTA:SA can you make setPedArmor in Client-Side?
-
A script more short. function onAdminWasted(_, killer) if killer and getElementType(killer) == "player" then local playerAcc = getPlayerAccount(source) local accName = getAccountName(playerAcc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerEvent("onAdminWasted", source, killer) end end end addEventHandler("onPlayerWasted", root, onAdminWasted) --Another Resource addEvent("onAdminWasted", true) function testMyNewEvent(thePlayer)--Parameters(1) : thePlayer : player who killed the admin. Source: the source of this event is the admin who was killed. kickPlayer(thePlayer, "You dont allowed to kill an admin.") outputChatBox("The player '"..getPlayerName(thePlayer).."' has been kicked because he/she killed you.", source, 0, 255, 0, true) end addEventHandler("onAdminWasted", root, testMyNewEvent)
-
Please read the full description before report about a resource : BECAUSE MTA RESOURCE PAGE DOESN'T ALLOW TO UPLOAD IT ,BECAUSE THIS IS TOO LARGE! THANKS FOR YOUR UNDERSTANDING
-
Can you ban the user who is doing spam in comments? https://community.multitheftauto.com/index.php?p= ... ts&id=7275
-
ELITE = createColCuboid ( 97.3376, 1800.0384, -32.0937, 250, 280, 120 ) createBlip ( 193.248, 1890.01, 17.234, 47 ) g_root = getRootElement () --rocketOne = createMarker ( -2931.5136, 454.4492, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker --rocketTwo = createMarker ( -2931.5932, 487.1994, 17.3671, "corona", 1.5, 255, 0, 0, 150 ) --test marker function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPlayerOccupiedVehicle ( pla ) if vehicle or not vehicle then local team = getPlayerTeam(pla) if ( not team ) then return end if team and getTeamName(team) == "NOMBREDETEAM" then outputChatBox ( "Bienvenido, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***Area Restringida***", pla, 255, 0, 0 ) outputChatBox ( "* "..getPlayerName(pla).." A Entrado En la Zona Restringida!", g_root, 255, 0, 0 ) end end end end addEventHandler ( "onColShapeHit", ELITE, hit ) function leave ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPlayerOccupiedVehicle ( pla ) if vehicle or not vehicle then local team = getPlayerTeam(pla) if ( not team ) then return end if team and getTeamName(team) == "NOMBREDETEAM" then outputChatBox ( "Adios!", pla, 0, 100, 0 ) else setElementData ( pla, "inRestrictedArea", "false" ) triggerClientEvent ( pla, "destroyTimers", g_root, pla ) outputDebugString ( "*"..getPlayerName(pla).." Esta invadiendo Zona" ) end end end end addEventHandler ( "onColShapeLeave", ELITE, leave )
-
slothbot1 = exports [ "slothbot" ]:spawnBot ( x+10, y, z+3, 90, skin, 0, 0, false, weapons [ skin ] or 0, "hunting" ) if slothbot1 then triggerClientEvent("spawneo", getRootElement())
-
-- Comando /intentar -- results = { "no lo logra", "lo logra" } function publicIntentar ( player, commandName, arg1 ) outputChatBox ( chatterName..":#FFFFFF "..message.." "..results[math.random( 1, #results )], getRootElement, 0, 255, 255, true ) end addCommandHandler ( "intentar", publicIntentar ) Intente hacer eso pero no me dio resultado chatterName no esta definido ni tampoco message. results = { "Lo logra.", "No lo logra." } function publicIntentar ( source, cmd, ... )-- Los argumentos de addCommandHandler ( en server side ): el primero es el jugador que ejecuto el comando. El segundo es el nombre del comando del comando. Luego de esos, puedes poner infinidades de argumentos, que seria el texto, separados por espacios, a menos de que hagas una tabla con el texto, que seria en este caso. if ... then --chekear si pusieron algun texto. local message = table.concat ( { ... }, " " )--Tabla para el texto, para que puedas escribir texto con espacios. outputChatBox ( getPlayerName(source)..":#FFFFFF "..message..". "..results[math.random( 1, #results )], root, 255, 255, 255, true )--Cuando esta '#' seguido del nombre de una table, en este caso #results, devuelve el numero de elementos que hay en esa tabla. math.random elige un numero al azar. El que toque sera el texto que saldra. Si sale 1 sera result[1] = 'Lo logra.', en caso contrario saldra result[2] = 'No lo logra.'." else -- caso contrario de que no haya texto... outputChatBox ( "Syntax /intentar 'texto'", source, 255, 0, 0, false ) end end addCommandHandler ( "intentar", publicIntentar ) Puedes buscar addCommandHandler en este foro para encontrar ejemplos que te puedan ayudar. No es dificil hacer un comando, solo tienes que esforzarte.
-
I want delete my script because I forgot change the name . https://community.multitheftauto.com/index.php?p= ... ls&id=7272 DONE
-
Marker15 = createMarker ( -1140.79, 1110.79, 38.20, "checkpoint", 2.5, 255, 255, 0, 255 ) function Marker410 ( hitPlayer, matchingDimension ) if source == Marker15 and hitPlayer == localPlayer then if isElement(Marker15) then destroyElement ( Marker15 ) end givePlayerMoney ( 500 ) setElementModel ( localPlayer, 188 ) outputChatBox ("Has pasado la prueba.", 255, 0, 0, false) end end addEventHandler ( "onClientMarkerHit", getRootElement(), Marker410 )
-
Serial algo asi?: function updateData() local miliseconds2 = getTickCount() local tickcountseconds = miliseconds2/1000 local time = getRealTime(tickcountseconds) local realTime = getRealTime() local seconds = time.second-realTime.second local minutes = time.minute-realTime.minute local hours = time.hour-realTime.hour setElementData(localPlayer, "PlayTime", seconds.." S "..minutes.." M "..hours.." H") end addEventHandler("onClientRender", root, updateData)
-
How can I make to create level with a determinate exp? With XML, table or what?
-
Me bajan los FPS en determinados puntos del mapa
Sasu replied to depato123's topic in Ayuda relacionada al cliente/servidor
A mi en las nubes ._. -
Cree un script para server cuanto tiempo estuvo jugando desde que se conecto pero me regresa "477986" al conectarse. Que acaso no deberia ser muchos menos de 10000 milisegundos? ._. Porque me conecto y ya tiene 477 segundos ._.. Client: function updateData() local miliseconds2 = getTickCount() local tickcountseconds = miliseconds2/1000 local time = getRealTime(tickcountseconds) local seconds = time.second local minutes = time.minute local hours = time.hour setElementData(localPlayer, "PlayTime", seconds.." S "..minutes.." M "..hours.." H") end addEventHandler("onClientRender", root, updateData) Y encima me muesta 21 horas ._.
-
It's return me "Nil". addEventHandler("onResourceStart", resourceRoot, function() local createTable = executeSQLQuery("CREATE TABLE IF NOT EXISTS level_system(account TEXT, exp INT, level INT, kills INT, dies INT)") end ) addEventHandler("onPlayerLogin", root, function(_, account) local accName = getAccountName(account) local statsTable = executeSQLQuery("SELECT kills,dies FROM level_system WHERE account=?", accName ) if ( #statsTable ~= 0 ) then setElementData(source, "Kills", statsTable["kills"]) setElementData(source, "Dies", statsTable["dies"]) outputChatBox(tostring(statsTable["dies"])) else executeSQLQuery("INSERT INTO level_system(account,kills,dies) VALUES(?,?,?)", accName, 0, 0 ) setElementData(source, "Kills", 0) setElementData(source, "Dies", 0) end end )
-
Me explican el uso del getTickCount y me dan un ejemplo?
-
function makePed() ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setPedRotation(ped1, 270) setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop") end addEventHandler ( "onResourceStart", resourceRoot, makePed ) --[[ Te falto el argumento en getResourceRootElement. Mejor usa: resourceRoot = variable del mta = getResourceRootElement(getThisResource()) ]]