Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. The problem was that the table wasn't defined?
  2. Is "Teampanel" table defined?
  3. -- server side: function link ( link, dimension ) triggerClientEvent ( 'linkplaySound', root, client, link, dimension ) end addEvent ( 'urlDim', true ) addEventHandler ( 'urlDim', root, link ) -- client side: function playSoundNow ( player, link, dimension ) local x, y, z = getElementPosition ( player ) sound3DSound = playSound3D ( link, x,y,z, true ) setElementDimension ( sound3DSound, dimension ) attachElements ( sound3DSound, player ) end addEvent ( 'linkplaySound', true ) addEventHandler ( 'linkplaySound', root, playSound ) Then you make your triggerServerEvent like this: triggerServerEvent ( 'urlDim', localPlayer, "http://radio.mfm.ua/online128.m3u", dimensionPlayer )
  4. Post the client and server side scripts.
  5. You are wrong, you can't send just elements. The triggerServerEvent is wrong, put localPlayer after the event name. Also, you named a function "playSound", that is not good, naming functions the same way as a native function shouldn't be done, unless you want to replace it.
  6. 'thePlayer' is not being sent from the client side. function halAdas ( ) exports.global:giveItem(client, 149, 1) end addEvent("halKifogas", true) addEventHandler("halKifogas", getRootElement(), halAdas)
  7. I would do this: Make a function which will play a sound from a URL sent by the server, then attach an event handler to it. Where you currently do "playSound3D" you use triggerServerEvent and pass the URL and dimension to the server side, then from the server side, you trigger the client side event you previously created, passing the URL and dimension received.
  8. onClientPlayerJoin is triggered only by remote players, you must use onClientResourceStart. And, replace "rootElement" in your event handler with "resourceRoot", else it'll be triggered when any resource starts.
  9. attachElementToElement is an outdated function. The function to attach is: attachElements
  10. That's because playSound3D only plays for the local player, you must make a client-server synchronization.
  11. Ese codigo lo encontraste asi? porque no tiene sentido, esta usando getElementData en una cuenta.
  12. Source code is not available. I'll lock the topic, since the script is highly outdated/bugged and I'm not planning on making any updates.
  13. As far as I know, some resources use the "admin" flags, so check in "admin/client/images/flags".
  14. Read what I said again, the problem is that you're using a wrong function name.
  15. Your function name at addEventHandler: "onTest", your real function name: "weapons". P.S: Why you need a server side script? there's a client side event for when player switch weapons.
  16. function hunter ( thePlayer ) local car = getPedOccupiedVehicle ( thePlayer ) for _, e in pairs ( getElementsByType ( "racepickup" ) ) do local t = getElementData ( e, "type" ) if ( t and t == "vehiclechange" ) then local v = getElementData ( e, "vehicle" ) if ( v and tonumber ( v ) == 425 ) then local hunterX, hunterY, hunterZ = getElementPosition ( e ) setElementPosition ( car, hunterX, hunterY, hunterZ ) break end end end end addCommandHandler ( "go", hunter ) Try it.
  17. You can't do it in a easy way, but you can attach the players to the vehicle.
  18. There is one for triggerClientEvent. https://wiki.multitheftauto.com/wiki/TriggerClientEvent
  19. I can't really find out the problem if you post the client side and server side mixed up on a single code.
  20. You can pass arguments to triggerClientEvent/triggerServerEvent
  21. To start with, how are you saving the play time and kills?
×
×
  • Create New...