Jump to content

Killer...

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Killer...

  1. Please, explain better you error. Because my english level is not very good.
  2. This is the problem, i don't know where in the script does appear the problem.
  3. When i log in, there's no problem. But when other players try to enter, the screen remains black whitout charging anything. Please help. And when i reconnect the problem apply me to.
  4. Thanks man, i put it on the addEventHandler("onResourceStart", resourceRoot, function() aclReload() connection = dbConnect( "mysql", "dbname=tlvrp;host=localhost;unix_socket=/var/lib/mysql/mysql.sock", "tlvrp", "gabriel32", "share=1" ) if (not connection) then outputServerLog("Error: MySQL connection is not established!") else outputServerLog("Notice: MySQL connection is established!") testSQLConnection() end setTimer(function() reconnectSQL() end, 60000*5, 0) for i,v in ipairs(getElementsByType("player")) do if (isClientInTutorial(v)) then local x, y, z = tonumber(getElementData(v, "roleplay:temp.x")), tonumber(getElementData(v, "roleplay:temp.y")), tonumber(getElementData(v, "roleplay:temp.z")) setElementPosition(v, x, y, z) setElementInterior(v, 0) setElementDimension(v, 0) setCameraTarget(v, v) setElementRotation(v, 0, 0, 90) setElementFrozen(v, false) setElementData(v, "roleplay:accounts.state", 2, true) removeElementData(v, "roleplay:temp.md5rofl") removeElementData(v, "roleplay:temp.x") removeElementData(v, "roleplay:temp.y") removeElementData(v, "roleplay:temp.z") setElementData(v, "roleplay:accounts.option3", 1, false) dbExec(connection, "UPDATE `??` SET `??` = '??' WHERE `??` = '??'", "accounts", "option_3", 1, "id", getAccountID(v)) toggleAllControls(v, true, true, true) end end end ) Because after i used the test mysql. Thanks Men
  5. Nope same problem. [12:05:53] ERROR: roleplay-accounts/s_accounts.lua:175: dbConnect failed; Can't connect to local MySQL server through socket '' (111)
  6. function testSQLConnection() if (connection) then local query = dbQuery(connection, "SELECT `??` FROM `??` WHERE `??` = '??' LIMIT 1", "value", "config", "key", "motd") if (query) then local result, num_affected_rows, errmsg = dbPoll(query, -1) if (num_affected_rows > 0) and (type(result) == "table") then for result,row in pairs(result) do if (row["value"]) then outputServerLog("Notice: Connection is working!") g_motd = row["value"] end end else outputServerLog("Error: MySQL query failed.") end else outputServerLog("Error: MySQL query failed.") end else outputServerLog("Error: Could not test the query connection due to no stable MySQL connection.") outputServerLog("... attempting a repair ...") test_db = dbConnect( "mysql", "dbname=tlvrp;host=localhost;unix_socket=/var/lib/mysql/mysql.sock", "tlvrp", "gabriel32", "share=1" ) if (not connection) then outputServerLog("... repair failed!") else outputServerLog("... repair successful!") end end end The error is the same
  7. Hello Everyone, i need your help. Im doing an MTA Fairplay server and...when i uplodaded it to the VPS, it tell's my this error. [2015-03-07 11:21:30] ERROR: roleplay-accounts/s_accounts.lua:174: dbConnect failed; Can't connect to local MySQL server through socket '' (111) [2015-03-07 11:21:30] Error: MySQL connection is not established! [2015-03-07 11:21:30] ERROR: roleplay-accounts/s_webserver.lua:85: dbConnect failed; Can't connect to local MySQL server through socket '' (111) [2015-03-07 11:21:30] Error: MySQL web_connection is not established! And i went to the script of s_accounts.lua:174 and s_webserver.lua:85, but there's no space por put the socket or something. Please help.
  8. 1º-. Si publicas un código porfavor usa el botón lua. Y pon el script para entre [.lua][./lua] ((Sin puntos)). 2º-. ¿Qué GM estás usando? Ya que eso me parece a MTA Paradise, y lo que tu has hecho está bastante más complejo. Añademe a Skype, y te ayudaré sin problemas. "killer.68x".
  9. Problem, with FairPlay, please help im using an Centos 6,6 86x_64. Please help. Problem: Register: Roleplay.0400840 registered a new account as Vladknovh [19:56:52] WARNING: roleplay-accounts\s_accounts.lua:331: dbExec failed; (1364) Field 'admin_level' doesn't have a default value
  10. Hello everybody. I was working on a system for plant and take maria. But there's problems that i don't know how to resolve, because that i'm doing this post. Here's the error: [2015-02-22 16:45:52] SCRIPT ERROR: drogas\s.lua:385: syntax error near 'setElementData' [2015-02-22 16:45:52] ERROR: Loading script failed: drogas\s.lua:385: syntax error near 'setElementData' And here's the system for plant. function plantarr( thePlayer, command) local semillas = getElementData(thePlayer, "semillas") local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( thePlayer ) if tonumber(semillas) <= semillas then if tonumber(semilla) <= semillas then if semillas >= 2 then exports.chat:me (thePlayer, "termina de plantar una planta de marihuana.") local plantaObject = createObject (3409, x, y, z -3.25) --Crear Objeto local aquitar = getElementData (player, "semillas" ) - 2(semillas) setElementData ( source, "semillas", aquitar ) setElementData ( source, "semillas", semillas ) setElementData ( source, "planta", plantaObject) exports.sql:query_free('UPDATE characters SET semillas = '.. aquitar ..' WHERE characterID = '..pjid) end else outputChatBox("((No tienes suficientes semillas))", source, 255, 0, 43) end end end addCommandHandler ( "plantar", plantarr ) And there's the system for take it, i don't know if it have any error but i put it here, if you can revise it and say me if it's good i will thank you, if you don't know, i will thank you too function cosecharr( thePlayer, command ) local semillas = getElementData(thePlayer, "semillas") local planta = getElementData ( source, "planta") local pjid = exports.players:getCharacterID( source ) x1, y1, z1 = getElementPosition ( thePlayer ) x2, y2, z2 = getElementPosition ( planta ) distance = getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) if ( distance < 2) then setPedAnimation (thePlayer, "BOMBER", "BOM_Plant", 4000) exports.chat:me (thePlayer, "arranca la planta y la mete en una bolsa.") exports.chat:ame (thePlayer, "Cosechó 5 gramos de marihuana.") exports.chat:ame (thePlayer, "Ya no queda rastro de la planta.") destroyElement ( planta ) setElementData ( source, "maria", maria ) local adar = getElementData ( player, "maria" ) + 5(maria) exports.sql:query_free('UPDATE characters SET maria = '.. adar ..' WHERE characterID = '..pjid) else outputChatBox("((Tienes que estar cerca de una planta para cosecharla))", source, 255, 0, 43) end end addCommandHandler ("cosechar", cosecharr) Thanks for watch my post, and try to help. Thanks to everybody, have a good Sunday.
  11. Hello everyone, i write this post because i need help whit the interior system of MTA Paradise, the problem it's that the vehicles when enter's in an interior get's the engine damaged. Here's the script. if isPedInVehicle ( player ) and getPedOccupiedVehicleSeat( player ) == 0 then vehicle = getPedOccupiedVehicle ( player ) setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, false ) setElementCollisionsEnabled( vehicle, false) for i = 0, getVehicleMaxPassengers( vehicle ) do local passag = getVehicleOccupant( vehicle, i ) if passag then setElementDimension( passag, getElementDimension( other ) ) setElementInterior( passag, getElementInterior( other ) ) setCameraInterior( passag, getElementInterior( other ) ) setElementPosition( passag, getElementPosition( other ) ) setCameraTarget( passag, passag ) end end setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, true ) setElementDimension( vehicle, getElementDimension( other ) ) setElementInterior( vehicle, getElementInterior( other ) ) setElementPosition( vehicle, getElementPosition( other ) ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) setVehicleDamageProof( vehicle, false ) setVehicleFrozen ( vehicle, false ) setElementCollisionsEnabled( vehicle, true) elseif isPedInVehicle ( player ) and not getPedOccupiedVehicleSeat( player ) == 0 then setVehicleFrozen ( vehicle, true ) setVehicleDamageProof( vehicle, true ) setElementCollisionsEnabled( vehicle, false) removePedFromVehicle( player ) setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) setVehicleFrozen ( vehicle, false ) setVehicleDamageProof( vehicle, true ) setElementCollisionsEnabled( vehicle, true) else setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) end end end end end Please help, and thanks for watch.
  12. Hi everyone i have been scripting an Marihuana system for MTA Paradise, and show's me some errors. These are the errors: [2015-02-14 15:21:05] WARNING: drogas\s.lua:363: Bad argument @ 'setElementData' [Expected element at argument 1, got nil] [2015-02-14 15:21:05] ERROR: drogas\s.lua:364: call: failed to call 'players:takemaria' [string "?"] [2015-02-14 15:21:05] ERROR: drogas\s.lua:365: attempt to concatenate local 'pjid' (a boolean value) And this is the script for plant the marihuana: function plantar ( thePlayer, command) local maria = getElementData(thePlayer, "maria") local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( thePlayer ) planta = createObject (3409, x, y, z) if maria >= 2 then if ( planta ) then -- if it was created outputChatBox("((Has plantado una planta de marihuana))", source, 0, 0, 255 ) setElementData ( source, "maria", maria ) exports.players:takemaria( source, 2 ) exports.sql:query_free('UPDATE characters SET maria = 5 WHERE characterID = '..pjid) setTimer ( plantac, 1000, 1) setTimer ( planta1, 2000, 1) setTimer ( planta2, 4000, 1) setTimer ( planta3, 6000, 1) setTimer ( planta4, 10000, 1) end else outputChatBox("((No tienes suficiente marihuana para poder plantar una planta de marihuana))", source, 0, 0, 255) end end addCommandHandler ( "plantar", plantar ) And on the script for take the marihuana: [2015-02-14 15:28:46] WARNING: drogas\s.lua:380: Bad argument @ 'getObjectScale' [Expected object at argument 1, got nil] [2015-02-14 15:28:46] WARNING: drogas\s.lua:382: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] [2015-02-14 15:28:46] WARNING: drogas\s.lua:383: Bad argument @ 'getElementPosition' [Expected element at argument 1, got boolean] [2015-02-14 15:28:46] WARNING: drogas\s.lua:384: Bad argument @ 'getDistanceBetweenPoints3D' [Expected vector3 at argument 1, got boolean] [2015-02-14 15:28:46] ERROR: drogas\s.lua:384: attempt to compare boolean with number And this is the script for take the marihuana: function cosechar ( ) local planta = getObjectScale ( planta ) local pjid = exports.players:getCharacterID( source ) local x,y,z = getElementPosition ( player ) local cx,cy,cz = getElementPosition ( planta ) if getDistanceBetweenPoints3D (x,y,z,cx,cy,cz) < 3 then if getObjectScale ( planta, 1) then destroyElement ( planta ) outputChatBox("((Has cosechado 6 g de maria))", source, 255, 255, 0) setElementData ( source, "maria", maria ) exports.players:giveMaria(source, 6) exports.sql:query_free('UPDATE characters SET maria = 5 WHERE characterID = '..pjid) else outputChatBox("((La planta es demasiado joven))", source, 255, 0, 0) end else outputChatBox("((Tienes que acercarte a una planta para cosecharla))", source, 255, 0, 0) end end addCommandHandler ("cosechar", cosechar) Please i need help, and thanks for your help.
  13. I think that this will function correctly. function createSlotmachine(thePlayer, ...) if thePlayer and isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then local dimension = getElementDimension(thePlayer) local interior = getElementInterior(thePlayer) local x, y, z = getElementPosition(thePlayer) local rotation = getPedRotation(thePlayer) z = z - 0.3 local slotID = exports.sql:query_insertid( "INSERT INTO slotmachine (x, y, z, rotation, interior, dimension) VALUES (" .. table.concat( { x, y, z, rotation, interior, dimension }, ", " ) .. ")" ) if slotID then local object = createSlotMachine(x, y, z+0.58, 0, 0, rotation-180, interior, dimension) setElementData(object, "dbid", slotID) local px = x + math.sin(math.rad(-rotation)) * 0.8 local py = y + math.cos(math.rad(-rotation)) * 0.8 local pz = z x = x + ((math.cos(math.rad(rotation)))*5) y = y + ((math.sin(math.rad(rotation)))*5) setElementPosition(thePlayer, x, y, z) outputChatBox("Slot machine created with ID #" .. slotID .. "!", thePlayer, 0, 255, 0) else outputChatBox("There was an error while creating a slot machine Try again.", thePlayer, 255, 0, 0) end end end addCommandHandler("addslotm", createSlotmachine)
  14. Killer...

    Job Help

    Hello everyone. I need some help whit this script. Because i want to do when you say /ruta and you're in a vehicle to start the job, showing to you the checkpoints. Server Part local vehicles = get( "vehicles" )-- load the civilian vehicles that'll automatically trigger the delivery mission if being entered local max_earnings = tonumber( get( "earnings" ) ) or 125 local delay = tonumber( get( "delay" ) ) or 25 -- local p = { } local function advanceRoute( player, earnings ) if p[ player ] and p[ player ].route and p[ player ].checkpoint then local cp = p[ player ].checkpoint + 1 local c = p[ player ].route[ cp ] local n = p[ player ].route[ cp + 1 ] if c then if p[ player ].route[ p[ player ].checkpoint ] then if p[ player ].route[ p[ player ].checkpoint ].stop and earnings and earnings > 0 then exports.players:giveMoney( player, earnings ) end if p[ player ].route[ p[ player ].checkpoint ].hint then triggerClientEvent( player, "gui:hint", player, "Ve a buscar provisiones a la fábrica abandonada.", p[ player ].route[ p[ player ].checkpoint ].hint ) end end if not n then -- last checkpoint triggerClientEvent( player, getResourceName( resource ) .. ":set", player, c.x, c.y, c.z, c.stop and true ) else triggerClientEvent( player, getResourceName( resource ) .. ":set", player, c.x, c.y, c.z, c.stop and true, n.x, n.y, n.z, n.stop and true ) end else if earnings then exports.players:giveMoney( player, earnings * 3 ) end triggerClientEvent( player, getResourceName( resource ) .. ":set", player ) p[ player ] = nil return false end p[ player ].checkpoint = cp return true end end local function newRoute( player ) p[ player ].vehicleOnResourceStart = nil local route = math.random( #routes ) p[ player ].route = routes[ route ] p[ player ].checkpoint = 0 advanceRoute( player ) end addEventHandler( "onVehicleEnter", root, function ruta( player, seat ) if seat == 0 and isPedInVehicle ( player ) then if not p[ player ] then p[ player ] = { } end if not p[ player ].route then newRoute( player ) else triggerClientEvent( player, getResourceName( resource ) .. ":show", player ) end end end ) addCommandHandler ("ruta", ruta) -- addEventHandler( "onResourceStart", resourceRoot, function( ) if not routes or routes == 0 then cancelEvent( ) return end -- setElementData( resourceRoot, "delay", delay ) -- for key, value in ipairs( getElementsByType( "player" ) ) do local vehicle = getPedOccupiedVehicle( value ) if vehicle and getPedOccupiedVehicleSeat( value ) == 0 then p[ value ] = { vehicleOnResourceStart = vehicle } end end setTimer( function( ) for key, value in pairs( p ) do p[ key ].vehicleOnResourceStart = nil end end, 10000, 1 ) end ) addEvent( getResourceName( resource ) .. ":ready", true ) addEventHandler( getResourceName( resource ) .. ":ready", root, function( ) if source == client then if p[ source ] and getPedOccupiedVehicle( source ) == p[ source ].vehicleOnResourceStart and getPedOccupiedVehicleSeat( source ) == 0 then newRoute( source ) end end end ) -- addEvent( getResourceName( resource ) .. ":complete", true ) addEventHandler( getResourceName( resource ) .. ":complete", root, function( ) if source == client then local vehicle = getPedOccupiedVehicle( source ) if p[ source ] and p[ source ].route and getPedOccupiedVehicleSeat( source ) == 0 then -- distance check if not p[ source ].route[ p[ source ].checkpoint ].stop or getDistanceBetweenPoints2D( p[ source ].route[ p[ source ].checkpoint ].x, p[ source ].route[ p[ source ].checkpoint ].y, getElementPosition( vehicle ) ) < 5 then local health = math.min( 1000, getElementHealth( vehicle ) ) if health > 350 then -- get a checkpoint advanceRoute( source, earnings ) end end end end end ) addEventHandler( "onCharacterLogout", root, function( ) if p[ source ] and p[ source ].route then triggerClientEvent( source, getResourceName( resource ) .. ":set", source ) end p[ source ] = nil end ) addEventHandler( "onPlayerQuit", root, function( ) p[ source ] = nil end ) -- -- function introduce( player ) triggerClientEvent( player, getResourceName( resource ) .. ":introduce", player ) end Client Part local localPlayer = getLocalPlayer( ) local position = nil local marker = nil local blip = nil local blip2 = nil local wait = false local screenX, screenY = guiGetScreenSize( ) function drawWaitingText( ) -- check if we still need to wait local text = "Espera..." local vehicle = getPedOccupiedVehicle( localPlayer ) if vehicle then if wait and wait ~= 0 then local diff = wait - getTickCount( ) if diff >= 0 then text = ( "Espera %.1f segundos para subir los paquetes al vehiculo!" ):format( diff / 1000 ) else triggerServerEvent( getResourceName( resource ) .. ":complete", localPlayer ) wait = 0 end -- draw the text dxDrawText( text, 4, 4, screenX, screenY, tocolor( 0, 0, 0, 255 ), 1, "pricedown", "center", "center" ) dxDrawText( text, 0, 0, screenX, screenY, tocolor( 255, 255, 255, 255 ), 1, "pricedown", "center", "center" ) end end -- local function hide( ) if isElement( blip ) then destroyElement( blip ) end blip = nil if isElement( blip2 ) then destroyElement( blip2 ) end blip2 = nil if isElement( marker ) then destroyElement( marker ) end marker = nil if wait then wait = false removeEventHandler( "onClientRender", root, drawWaitingText ) end end local function show( ) hide( ) if position then -- in lack of a more detailed close-location (aka we use the entrance), use large markers marker = createMarker( position.x, position.y, position.z, "checkpoint", 3, position.stop and 0 or 255, 255, 0, 63 ) if marker then blip = createBlipAttachedTo( marker, 0, 2, position.stop and 0 or 255, 255, 0, 255 ) end if position.nx and position.ny and position.nz then blip2 = createBlip( position.nx, position.ny, position.nz, 0, 1, position.nstop and 0 or 255, 255, 0, 255 ) end end end addEvent( getResourceName( resource ) .. ":show", true ) addEventHandler( getResourceName( resource ) .. ":show", localPlayer, show ) addEvent( getResourceName( resource ) .. ":set", true ) addEventHandler( getResourceName( resource ) .. ":set", localPlayer, function( x, y, z, stop, nx, ny, nz, nstop ) if x and y and z then position = { x = x, y = y, z = z, stop = stop, nx = nx, ny = ny, nz = nz, nstop = nstop } show( ) else position = nil hide( ) end end ) addEventHandler( "onClientPlayerVehicleExit", localPlayer, hide ) addEventHandler( "onClientResourceStart", resourceRoot, function( ) triggerServerEvent( getResourceName( resource ) .. ":ready", localPlayer ) end ) addEventHandler( "onClientMarkerHit", resourceRoot, function( element, matching ) if matching and element == localPlayer then if position.stop then if not wait then wait = getTickCount( ) + getElementData( resourceRoot, "delay" ) * 1000 addEventHandler( "onClientRender", root, drawWaitingText ) end else triggerServerEvent( getResourceName( resource ) .. ":complete", localPlayer ) end end end ) addEventHandler( "onClientMarkerLeave", resourceRoot, function( element, matching ) if matching and element == localPlayer then wait = false removeEventHandler( "onClientRender", root, drawWaitingText ) exports.gui:hint( "Cargador", "Para recibir paga, ve a por paquetes en la vieja fábrica. Se recomienda no ir solo!", 3 ) end end ) Please help me, i do this because i'm doing an Zombie Roleplay, trying to combine MTA Paradise whit a ZombieGamemode. And for now it's going good. If you want to participate in this Spanish project, contact me.
  15. I think that's because there's no function explanation. Its only triggerEvent( "onColShapeHit", other, player, vehicle, true ) and then end
  16. It's a MTA: Paradise GM base.
  17. Hi everyone, today i need some help whit a script, the problem that's the vehicle doesn't teleport to the interior or to the outside, here i leave the script. What is the problem? local function enterInterior( player, vehicle, key, state, colShape ) local data = colspheres[ colShape ] if data then local interior = interiors[ data.id ] if interior.type > 0 and interior.characterID == 0 then -- buy the interior if exports.players:takeMoney( player, interior.price ) then local characterID = exports.players:getCharacterID( player ) if characterID then -- update the owner if possible if exports.sql:query_free( "UPDATE interiors SET characterID = " .. characterID .. " WHERE interiorID = " .. data.id ) then interior.characterID = characterID -- remove our element data that claims this as buyable removeElementData( interior.outside, "type" ) removeElementData( interior.outside, "price" ) -- give him the house key exports.items:give( player, 2, data.id ) -- stick a blip to it interior.blip = not interior.locked and interior.outsideDimension == 0 and createBlipEx( interior.outside, interior.inside ) -- message to the player outputChatBox( "Congratulations! You've bought " .. interior.name .. " for $" .. interior.price .. "!", player, 0, 255, 0 ) else outputChatBox( "MySQL-Error.", player, 255, 0, 0 ) exports.players:giveMoney( player, interior.price ) end end else outputChatBox( "Tu necesitas $" .. ( interior.price - exports.players:getMoney( player ) ) .. " para comprar esta propiedad.", player, 255, 0, 0 ) end elseif interior.type > 0 and interior.locked then exports.chat:me( player, "intenta abrir la puerta pero sin suerte." ) else local other = data.other if other then triggerEvent( "onColShapeLeave", colShape, player, vehicle, true ) -- teleport the player setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other )) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( vehicle, getElementPosition( other ) ) setElementDimension( vehicle, getElementDimension( other )) setElementInterior( vehicle, getElementInterior( other )) setCameraTarget( player, player ) triggerEvent( "onColShapeHit", other, player, vehicle, true ) end end end end
  18. Buenas a todos, hago este post ya que necesito ayuda con el script del panel mecánico. Y aunque sete la zona del taller me sigue diciendo que no estoy en el taller./ Hello Everybody, i do this topic, because i need some help whit a mechanic panel, and if i set the mechanic zone it tells me that im not in the mechanic zone. Meca = createColCuboid( 398.22, -2339.18, 7.9, 0, 0, 0) Meca2 = createColCuboid(398.22, -2339.18, 7.9, 0, 0, 0) Meca3 = createColCuboid(398.22, -2339.18, 7.9, 0, 0, 0) jobs ={ [498] = true, [431] = true, [574] = true, [420] = true } addEventHandler( "onResourceStart", resourceRoot, function() for key, value in ipairs( getElementsByType( "player" ) ) do bindKey( value, "F4", "down", "guimecanico" ) end end) addEventHandler( "onPlayerJoin", root, function( ) bindKey( source, "F4", "down", "guimecanico" ) end ) addCommandHandler( { "guimecanico", "guicasos" }, function(player) if exports.factions:isPlayerInFaction( player, 2 ) or exports.factions:isPlayerInFaction( player, 2 ) then if isElementWithinColShape ( player, Meca ) or isElementWithinColShape ( player, Meca2 ) then triggerClientEvent( player, "gui:meca", player ) else outputChatBox("No estás en el taller.", player, 255, 0, 0) end elseif exports.factions:isPlayerInFaction( player, 1 ) then local result = exports.sql:query_assoc( "SELECT * FROM FCPD_casos ORDER BY ID ASC" ) triggerClientEvent( player, "gui:FCPD", player, result ) end end)
  19. Hello, i have got problems whit a Vehicle Upgrade script. function consoleAddUpgrade ( thePlayer, commandName, id ) if ( isPedInVehicle ( thePlayer ) ) then local id = tonumber ( id ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) local success = addVehicleUpgrade ( theVehicle, id ) if ( success ) then outputConsole ( getVehicleUpgradeSlotName ( id ) .. " modificacion anadida.", thePlayer ) else outputConsole ( "((Fallo al tunear)).", thePlayer ) end else outputConsole ( "((Tienes que estar en un vehiculo!))", thePlayer ) end end -- add the function as a handler for the "addupgrade" command addCommandHandler ( "tunear", consoleAddUpgrade ) Te problem is that, [2014-11-08 19:34:44] WARNING: mechanic/mechanic-s.lua:10: Bad argument @ 'addVehicleUpgrade' [Expected number at argument 2, got nil]
  20. Hi to everybody, i need some help, I want to do a Speedo for a Roleplay Project, Can anyone help me?
  21. How i can change the world for another? Like Liberty City map.
×
×
  • Create New...