Jump to content

Search the Community

Showing results for tags 'triggerserverevent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me





Found 10 results

  1. I'm very noob at scripting :' (, but i did this: (It's a script for the Imponte Deluxo of GTA Online) Serverside: function deluxe ( player ) local vehicle = getPedOccupiedVehicle(player) if isElement(vehicle) then if getVehicleDoorOpenRatio(vehicle,5) > 0 then setVehicleDoorOpenRatio(vehicle,5,0,ms) setVehicleDoorOpenRatio(vehicle,4,0,ms) setVehicleDoorOpenRatio(vehicle,0,0,ms) else setVehicleDoorOpenRatio(vehicle,5,1,ms) setVehicleDoorOpenRatio(vehicle,4,1,ms) setVehicleDoorOpenRatio(vehicle,0,1,ms) end end end addEvent( "deluxo", true ) addEventH
  2. Hey guys please help!!! I have been researching and researching for almost 8 hours now. And I am just stuck as to what I am fundamentally getting wrong here. Main goal: I would like when the person gets into a vehicle, read the license plates, send plates to the server, read a table in the DB, then send info from table back to the client to use in other functions. What works: I am OK server side, I am able to read from the database and pass that back to the client, but can only trigger server side with a RegisterCommand. Issue: Client side, when I start using trigger
  3. Bom dia, estou fazendo meu sistema de porte de armas, com o botão em gui no alpha 0, mas, parece que o triggerServerEvent não funciona, fiz o sistema de fechar no client funcionou de boa, agora quando clico no adquirir porte, ele não faz simplesmente nada. (no script abaixo vou deixar com alpha) Client Side: local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) local render = false local Porte = createMarker(296.087, -38.088, 1001.516-1.1, "cylinder", 1.2, 20, 70, 230, 95) setElementInterior(Porte, 1) function botoes()
  4. Hello, I want to pass the Client-player with the function triggerServerEvent (for example to trigger an event and ONLY the client triggered the event so that ONLY HE would receive a message) and this is how i would do it: triggerServerEvent("blabla", localPlayer, bla) But MTA-wiki says the following sentence: Warning: You should use the global variable client serverside instead of passing the localPlayer by parameter or source. Otherwise event faking (passing another player instead of the localPlayer) would be possible. So I assume, that I shouldn't do it the way I just poste
  5. It's because of the onClientResourceStart event, but i dont know why its triggering it twice. Thanks function create() triggerServerEvent ( "create_s", resourceRoot) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), create) and the server function create_s() outputChatBox("lol") end addEvent("create_s", true) addEventHandler("create_s", resourceRoot, create_s)
  6. Is it possible to prevent trggerServerEvent and TriggerClientEvent from triggering other resources? Thanks
  7. Hi, I will doing job, but I always have got problem with arguments in trigger I read Elements Tree on wiki, but I still do not know what this is about When player hit marker then s-side must create vehicle. C-side StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer )
  8. Everythink is just working fine. The problem is that the triggerServerEvent is not triggering to the server. line: 43, 69, 75, 81, 87 CLIENT.LUA function create_weapon(veh) local x,y,z = getElementPosition(veh) local obj = createObject ( 357, x,y,z) attachElements ( obj, veh, 0,0,0,0,0,0 ) setElementData(localPlayer,"obj",obj) local gun1 = createWeapon(30, x,y,z) local gun2 = createWeapon(30, x,y,z) local gun3 = createWeapon(30, x,y,z) local gun4 = createWeapon(30, x,y,z) setElementData(localPlayer,"gun1",gun1) setElementData(localPlayer,"gun2",gun2) setElementData(loca
  9. I can't find an error in this script, what's wrong here? The message says that the event is not added serverside... coreh_client.lua local tableToSendVip = { [1] = guiGetText( hc_edith['edith_ec_X'] ), [4] = guiGetText( hc_edith['edith_etc_X'] ), [2] = guiGetText( hc_edith['edith_ec_Y'] ), [5] = guiGetText( hc_edith['edith_etc_Y'] ), [3] = guiGetText( hc_edith['edith_ec_Z'] ), [6] = guiGetText( hc_edith['edith_etc_Z'] ), [7] = guiGetText( hc_edith['edith_exc_X'] ), [10] = guiGetText( hc_edith['edith_extc_X'] ), [8] = guiGetText( hc_edith['edi
  10. السلام عليكم ورحمة الله وبركاته ابي مساعدة بسيطة وهي انا مسوي ترايجر وكلمة في ملف سيرفر ( عدد ) وارسلت هاذي الكلمة بالترايجر لملف الكلينت لكنها ما توصل - التجربة -- Server -- function Miner () MyGold = "10" triggerClientEvent(source, "getMinerHave", source, MyGold ) end addEventHandler("onResourceStart", resourceRoot, Miner) -- Client -- addEvent("getMinerHave", true) addEventHandler ("getMinerHave", root, function ( MyGold ) MyGold = tonumber(MyGold) end ) addEventHandler("onClientRender", root, function() dxDrawText(MyJewels, 270, (screenH - 80), ((screenW - 100) / 2) +
  • Create New...