Jump to content

Ascla

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by Ascla

  1. Ascla

    Objects samp

    When i use the id 10000, it works. But when i use a free id like 18646, it doesn't work and gives me the error of Invalid model id
  2. Ascla

    Objects samp

    Yes but when I create the object 18646, I have this error : Bad argument @ 'createObject' [invalid model id] My script : Server: function objet (thePlayer, command) local x,y,z = getElementPosition(thePlayer) createObject ( 18646, x, y, z) end addCommandHandler("objet", objet) Client: function tramReplace() PoliceLight1 = engineLoadDFF ( "objets/PoliceLight1.dff", 18646 ) engineReplaceModel ( PoliceLight1, 18646 ) end addEventHandler ( "onClientResourceStart", getRootElement(), tramReplace)
  3. Ascla

    Objects samp

    Yes but I want not replace an object but add an object
  4. Ascla

    Objects samp

    Hey all, I have a problem I want to replace the id 18646 with a samp object. I have the .dff of the samp object. But is it possible and how ? CreateObject(18646) didn't work
  5. Hey guys, I have an error this night ... Can you help me please ? So i tested this script : https://community.multitheftauto.com/index.php?p=resources&s=details&id=1873 I have pasted the script in pastebin, as you can see. Server Side : http://pastebin.com/3kZLX5pY Client Side : http://pastebin.com/dH59WTnC Everything is working, but when i land on the floor, I have these errors : [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abseiling) [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abeilped) [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abseiling) [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abeilped) [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abseiling) [admin]/admin/server/admin_server.lua:1436: Admin security - Client/player mismatch from (my IP) (onElementDataChange abeilped)
  6. Ascla

    Problem with /me

    he nothing happens when we wrote /me
  7. Hey all, I'm doing a server RP and when I add the command /me, the command doesn't work. But when I replace the command /me with /a, the function works. How can I get the command /me ? Thanks.
  8. toggleControl ( player, "enter_exit", false ) setControlState ( player, "enter_exit", true ) setTimer(function() toggleControl ( player, "enter_exit", true ) end, 1000, 0) end
  9. It works toggleControl ( player, "enter_exit", false ) setControlState ( player, "enter_exit", true )
  10. Hey all, I need your help. I need a function for ejecting someone from a vehicle but I can't find it. The function removePedFromVehicle() is not good for a rp server ... Cause i need to see the player going out from the vehicle by the door, and not by a teleport .. Thanks and merry Christmas !
  11. Thanks a lot ! It works good. I love you <3 function _changeEngineState( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if ( theVehicle ) then if ( getPedOccupiedVehicleSeat( thePlayer ) == 0 ) then local vehicleID = getElementData( theVehicle, "vehicleID" ) local result = mysql_query ( database ,"SELECT * FROM `vehicles` WHERE `vehicleID` = '"..tonumber(vehicleID).."'") if result then if ( getVehicleEngineState( theVehicle ) == true) then setVehicleEngineState( theVehicle, false ) -- turn it off. setElementData( theVehicle, "moteur", 0) mysql_query(database,"UPDATE `vehicles` SET enginestate = '0' WHERE vehicleID='"..vehicleID.."'") elseif ( getVehicleEngineState( theVehicle ) == false) then setVehicleEngineState( theVehicle, true ) -- turn it on setElementData( theVehicle, "moteur", 1) mysql_query(database,"UPDATE `vehicles` SET enginestate = '1' WHERE vehicleID='"..vehicleID.."'") end end end end end addCommandHandler("moteur", _changeEngineState)
  12. Hey guys, I'm new here, but i'm trying to make my own script for my rp server. So, i want set in my database the engine status of my car, but when the server execute the command, it changes each car's engine. Exemple : when i stop my engine, it will set OFF, for each cars of the map. My script : function _changeEngineState( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if ( theVehicle ) then if ( getPedOccupiedVehicleSeat( thePlayer ) == 0 ) then local vehicleID = getElementData( theVehicle, "vehicleID" ) local result = mysql_query ( database ,"SELECT * FROM `vehicles` WHERE `vehicleID` = '"..tonumber(vehicleID).."'") if result then if ( getVehicleEngineState( theVehicle ) == true) then setVehicleEngineState( theVehicle, false ) -- turn it off. setElementData( theVehicle, "moteur", 0) mysql_query(database,"UPDATE `vehicles` WHERE vehicleID='"..vehicleid.."' SET enginestate = '0'") elseif ( getVehicleEngineState( theVehicle ) == false) then setVehicleEngineState( theVehicle, true ) -- turn it on setElementData( theVehicle, "moteur", 1) mysql_query(database,"UPDATE `vehicles` WHERE vehicleID='"..vehicleid.."' SET enginestate = '1'") end end end end end addCommandHandler("moteur", _changeEngineState)
  13. Bonsoir à toi, Tu as bien ajouté ton pseudo au fichier acl.xml ? Attention, si ton nom comporte une majuscule et tu ne la mentionne pas dans ton acl, ça ne marchera pas. Et dernière question, tu as bien fait /login [pseudo] [mot de passe] ?
  14. Donc j'ai local server = get( "localhost" ) or "localhost" -- server local user = get( "root" ) or "root" -- username local password = get( "" ) or "" -- password local db = get( "mta" ) or "mta" -- database local port = get( "" ) or 3306 local socket = get( "" ) or nil Mais toujours les mêmes erreurs.
  15. Sorry for my late response. I tried what you said but I always make the same mistakes. Yes I use mySQL with wamp
  16. Désolé de ma réponse tardive. Donc, non je ne lançais pas le SQL en premier, mais maintenant oui. Toujours les mêmes erreurs ... [2012-02-29 15:41:29] ERROR: Unable to start resource sql; Start up of resource cancelled by script [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: exports: Call to non-running server resource (sql) [string "?"] [2012-02-29 15:41:30] ERROR: interior\s_interior.lua:16: bad argument #1 to 'ipairs' (table expected, got nil) [2012-02-29 15:41:30] ERROR: Couldn't find resource play. Check it exists. [2012-02-29 15:41:30] Server started and is ready to accept connections! [2012-02-29 15:41:30] Type 'help' for a list of commands. J'ai bien crée la BDD via wamp et voici ce que j'ai mis dans le fichier SQL local server = get( "localhost" ) or "" -- server local user = get( "root" ) or "" -- username local password = get( "" ) or "" -- password local db = get( "mta" ) or "" -- database local port = get( "" ) or 3306 local socket = get( "socket" ) or nil Mais je ne sais pas quoi mettre à Socket.
  17. But what do I put the port and the socket?
  18. I can not go through wamp?
  19. Hello, I have a problem with the connection to MYSQL. I enter this in the file "mysql" folder "sql" local server = get( "localhost" ) or "" -- server local user = get( "root" ) or "" -- username local password = get( "" ) or "" -- password local db = get( "unix" ) or "" -- database local port = get( "" ) or 3306 local socket = get( "" ) or nil But when I run the server, I have these errors http://pastebin.com/xE8SUCE9 PS: Sorry if there are mistakes, I'm French
  20. Bonjour, j'ai téléchargé le GM RP Venux RP à ce lien https://forum.multitheftauto.com/viewtopic.php?f=108&t=37086. Tout fonctionne mais j'ai un problème avec la connection à la base de donnée. Voici ce que j'ai mis dans le fichier mysql du dossier SQL local server = get( "localhost" ) or "" -- server local user = get( "root" ) or "" -- username local password = get( "" ) or "" -- password local db = get( "unix" ) or "" -- database local port = get( "" ) or 3306 local socket = get( "" ) or nil Je passe par wamp, j'ai bien crée la base, etc ... Mais j'ai des erreurs, voici mes logs http://pastebin.com/xE8SUCE9 Merci
  21. Hello, I have a problem with the connection to MYSQL. I enter this in the file "mysql" folder "sql" local server = get( "localhost" ) or "" -- server local user = get( "root" ) or "" -- username local password = get( "" ) or "" -- password local db = get( "unix" ) or "" -- database local port = get( "" ) or 3306 local socket = get( "" ) or nil But when I run the server, I have these errors http://pastebin.com/xE8SUCE9 PS: Sorry if there are mistakes, I'm French
  22. Bonjour à tous, c'est encore moi et j'ai encore un problème Je vous explique, j'ai télécharger un serveur mta RP. Donc je supprime tout les fichiers du dossier ressources et je les remplace par le fichier que j'ai téléchargé. Mais quand je lance mon serveur, je suis obligé de start [ressource name] toutes les ressources. Il n'y a pas un moyen de tous les start au démarrage du serveur ? PS: je suis en local.
×
×
  • Create New...