Jump to content

Tokio

Members
  • Posts

    309
  • Joined

  • Last visited

Everything posted by Tokio

  1. i downloaded this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3716 and i wanna give access for the panel only for admins.. but how can i do this? sorry for my bad english...
  2. Here is my code: local times = 0 function ada(chosenOption) if chosenOption == 9 then setElementData(root, "played", times+1) end end addEventHandler("onPollEnd", root,ada) I want add +1 times if everyone votes Play again. But does not working.. How to fix?
  3. Somehow i can make this possible? When a player connect, then he have to wait the end of download, then he can use the fr gui. I want make fr gui usable when player download the mods. Sorry for my bad english..
  4. but im play sound from youtube, so need the url path
  5. I attached a song to my car, but when i'll go far away from car, the music starts from the beginning... s: how to fix this?
  6. this can work? function trig() for _, player in pairs( getElementsByType 'player' ) do triggerClientEvent(player,"asd123asd456",player) end end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig )
  7. i changed the asd.mp3 to converterlink/ytlink, but i get ytlink with guiGetText. how to add this to server side?
  8. And where download the .mp3? sorry for my bad english..:s
  9. client: function rtwjhrt() if isElement(ss) then stopSound(ss) return end local car = getPedOccupiedVehicle ( localPlayer ) local gettext = guiGetText ( GUIEditor.edit[1] ) local x, y, z = getElementPosition( car ) local ss = playSound3D( 'asd.mp3', x, y, z ) setSoundMaxDistance( ss, 85 ) attachElements(ss,car) end addEvent("asd123asd456",true) addEventHandler("asd123asd456",root,rtwjhrt) server: function trig() triggerClientEvent(root,"asd123asd456",root) end addEvent( "asjdlaj", true ) addEventHandler( "asjdlaj", root, trig ) Why not hear the sound another players?
  10. If i play a music from youtube with fetchRemote, the .mp3 downloaded it somewhere?
  11. vas1 = createObject ( 3529, -2112.55103, -249.87376, 35.32031, 0, 0, 0 ) function repairClickedVehicle( button, state, player ) if button == "left" and state == "down" then if getElementType( source ) == "object" then destroyElement(vas1) end end end addEventHandler( "onElementClicked", getRootElement( ), repairClickedVehicle ) This working fine... but when i reconnect, the object appear again.. how to fix this?
  12. But this ( https://wiki.multitheftauto.com/wiki/DxDrawRectangle3D ) does not working.. why?
  13. I want create a dxdraw rectangle and text on the map. But how to make this possible?
  14. function onSwitchToMinigun (previous, current) if ( current == 38 ) then local accName = getAccountName ( getPlayerAccount ( source ) ) if ( hasObjectPermissionTo(source, "function.kickPlayer") then else killPed(source) takeWeapon( source, 38) end end end addEventHandler("onPlayerWeaponSwitch", getRootElement(), onSwitchToMinigun )
  15. i added this line to my script: takeWeapon( source, 38, 99999 ) buuut, does not working.. how to fix this?
  16. this is my code: function onQuit(thePlayer) for i,v in pairs(getElementsByType("vehicle",resourceRoot)) do if getElementData(v,"oveie") == getPlayerName(thePlayer) then destroyElement(v) end end end addEventHandler ( "onPlayerQuit", root, onQuit ) but this does not working.. why? how to fix it?
  17. where to put in the code? after " for id, player in ipairs(all_players) do " or before?
×
×
  • Create New...