Jump to content

Shido

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Shido

  1. Aaah LOL no sabia eso, no habia probado el lua pero si verifiqué los parentesis (porque usé muchos) y como estaba todo bien asumí que no habia error.. el error estaba en un addCommandHandler que hice a las apuradas y le creé un function con nombre adentro... Bueno gracias por responder tan rapido
  2. Tengo dos archivos para compilar, al subir el primero salio sin problemas pero con el segundo me pasó esto... Intenté resubirlo, cambiarle el nombre, subir una copia, y nada y luego al subir otro archivo me dejó, solo me pasa con ese... Alguien que pueda decirme que pasa?
  3. I think i understand what you want, that code is fine, but there is a huge detail, i see this: addEvent("onPlayerPickUpRacePickup", true) but i dont see this: addEventHandler("onPlayerPickUpRacePickup",root,onVehicleEnter_handler) If its skipped the race gamemode wont read the function when you change the vehicle via race pickup (probably). Also remember that if theres no data for "wheel" on your account the function will fail.
  4. Shido

    Timer sync.

    Its not actually "send" the timer (i dont know if it is even possible), but you can use arguments to make the client call variables that were defined server-side. There's no point on creating a new timer server-side since it will be totally different from the one on client-side and you will just call the function twice (once on client and once on server). -- Client-side -- addEvent("timerClient", true) addEventHandler("timerClient", root, function(arguments) timer = setTimer(functionName, 5000, 1,arguments) end) -- Server-side -- function startTimer() arguments = something triggerClientEvent("timerClient",source,arguments) end Of course you have to define the variables and trigger the event on the same server-side function.
  5. It kind of works but it takes the [arga..","..v] as a single string, and so the execute passes it as a single argument
  6. Hey there, I'm on a command script and i wanted to make commands executable with the "!" character apart of the ususal "/" For example: Chatbox say: /givemoney Shido 1 Output: * Shido gave Shido $1 --------------------------- Chatbox say: !givemoney Shido 1 Output: Shido: !givemoney Shido 1 * Shido gave Shido $1 The best way I could think was making the server detect when the player uses the "!" at the start of the message and putting all the words on a table, then using the entries of the table to make an executeCommandHandler So after a little working I got this: addEventHandler("onPlayerChat",root,function(msg,msgtype) if msgtype == 0 then local s,e = string.find(msg,"%!") -- Finding the "!" char if s == 1 then local cmdmsg = string.gsub(msg,"!","",1) -- Extracting the "!" char from the string local args = string.explode(cmdmsg," ") -- Function from the "Useful Functions" page on the wiki executeCommandHandler(args[1],source,args[2],args[3],etc...) -- Finding a way to put all the arguments...... end end end) Is there a best way to get this working? or if i'm in the right way, is there an appropiate way to put the arguments on the execute function? (because i know the args[2],args[3],etc... is a really bad way)
×
×
  • Create New...