Jump to content

Vision

Members
  • Posts

    405
  • Joined

  • Last visited

Everything posted by Vision

  1. https://community.multitheftauto.com/ Just search.
  2. Go to mtaserver.conf and add this <resource src="YourResourceName" startup="1" protected="0" /> Change "YourResourceName" to resource that you want to start
  3. Vision

    [HELP] problem

    setElementData ( source, "cans", tonumber(getElementData(source, "cans") or 0) + cans, false )
  4. Stolen https://community.multitheftauto.com/index.php?p= ... ls&id=6262 Original https://community.multitheftauto.com/index.php?p= ... ls&id=4400 DONE
  5. Vision

    [WIP]MTAM

    Good luck with it.
  6. function addACLGroupObject ( thePlayer, commandName, groupName) local ourGroup = aclGetGroup ( groupName ) -- if there is no previous group with this name, we need to create one if not ourGroup then ourGroup = aclCreateGroup ( groupName ) end -- and finally let's add the object to it's group account = getPlayerAccount(thePlayer) accountN = getAccountName(account) aclGroupAddObject ( ourGroup, 'user.'..accountN ) -- don't forget to save the ACL after it has been modified aclSave () end addCommandHandler ( "creategang", addACLGroupObject )
  7. viewtopic.php?f=104&t=31668
  8. Vision

    Help please

    https://wiki.multitheftauto.com/wiki/Scr ... troduction
  9. Server addEvent ( "payPlayer", true ) function givePlayerRobPay () money = math.random ( 350, 1020 ) givePlayerMoney ( source, money ) outputChatBox ( "You succesfully robbed $" ..money, source ) end addEventHandler ( "payPlayer", root, givePlayerRobPay ) Client local robberHouses = { {-748.70367431641, 741.42608642578, 18.222219467163}, {-745.70367431641, 741.42608642578, 18.222219467163} -- Messi Put coord In This Table pl0x } function unpackRobberHouses () return unpack ( robberHouses [ math.random ( #robberHouses ) ] ) end addEvent ( "createHouse", true ) function createHouses () x, y, z = unpackRobberHouses () local rob = getElementModel ( localPlayer ) if ( rob == 29 ) then robhouseMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end end addEventHandler ( "createHouse", root, createHouses ) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) local rob = getElementModel ( localPlayer ) if ( rob == 29 ) then triggerEvent ( "createHouse", localPlayer ) end end ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( source == robhouseMarker and not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "payPlayer", localPlayer ) destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerEvent ( "createHouse", localPlayer ) end end )
  10. https://wiki.multitheftauto.com/wiki/CJ_Clothes
  11. Try this local team = getTeamName ( getPlayerTeam( source ) ) if ( team == "Yakuza" ) or ( team == "The Triads" ) then
  12. function openGui() if not isElement(GUIEditor.window[1]) then memberGui() end if not guiGetVisible(GUIEditor.window[1]) then guiSetVisible ( GUIEditor.window[1], true ) else guiSetVisible ( GUIEditor.window[1], false ) end end
  13. Vision

    Gui problem

    addEventHandler("onClientResourceStart",resourceRoot, function () Window = guiCreateWindow(583, 409, 197, 327, "Fake Cars", false) guiWindowSetSizable(Window, false) obutton = guiCreateButton(9, 96, 117, 33, ":O", false, Window) Perennial = guiCreateButton(9, 131, 117, 35, "Perennial", false, Window) Walton = guiCreateButton(9, 169, 118, 34, "Walton", false, Window) Tampa = guiCreateButton(9, 206, 118, 34, "Tampa", false, Window) AutoWahlenLabel = guiCreateLabel(30, 57, 139, 15, "Bitte wähle ein Auto aus", false, Window) Abbrechen = guiCreateButton(10, 288, 177, 29, "Abbrechen", false, Window) OderMochtestDu = guiCreateLabel(39, 269, 117, 15, "Oder möchtest du...", false, Window) lable1 = guiCreateLabel(131, 104, 52, 15, "500$", false, Window) guiLabelSetColor(lable1, 23, 132, 5) PerennialPreis = guiCreateLabel(131, 141, 53, 15, "2000$", false, Window) guiLabelSetColor(PerennialPreis, 23, 132, 5) WaltonPreis = guiCreateLabel(132, 181, 55, 15, "1500$", false, Window) guiLabelSetColor(WaltonPreis, 23, 132, 5) TampaPreis = guiCreateLabel(131, 218, 56, 15, "750$", false, Window) guiLabelSetColor(TampaPreis, 23, 132, 5) end ) function Fake_Cars_start () guiSetVisible(Window, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), Fake_Cars_start) function Fake_Cars_show() local IsWindowVisible = guiGetVisible(Window) if (IsWindowVisible == true) then guiSetVisible(Window, false) guiSetInputEnabled(false) showCursor(false) end if (IsWindowVisible == false) then guiSetVisible(Window, true) guiSetInputEnabled(true) showCursor(true) end end function Buttons (state) if state == "left" then if source == X then Fake_Cars_show() end end end addEventHandler("onClientGUIClick", getRootElement(), Buttons) addEvent("open", true) addEventHandler("open", getRootElement (), Fake_Cars_show)
  14. Vision

    Help - XML

    Try to add xmlSaveFile
  15. -- server side addCommandHandler( "text", function( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local accName = getAccountName ( getPlayerAccount( player ) ) -- get his account if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent( player, "text", root ) end end end ) -- client side GUIEditor_Label = {} GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Edit = {} GUIEditor_Label[1] = guiCreateLabel(218,558,387,41,"",false) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Window[1] = guiCreateWindow(221,83,310,341,"",false) guiSetVisible ( GUIEditor_Window[1] , false ) GUIEditor_Edit[1] = guiCreateEdit(10,25,287,47,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,295,126,35,"Send Text",false,GUIEditor_Window[1]) close = guiCreateButton(173,294,126,35,"Close",false,GUIEditor_Window[1]) addEvent ("text", true ) addEventHandler( "text", root, function () guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end ) -------------------- addEventHandler ( "onClientGUIClick", root, function () local send = guiGetText(GUIEditor_Edit[1]) if ( source == GUIEditor_Button[1] ) then guiSetText ( GUIEditor_Label[1], " admin : "..send) guiSetFont(GUIEditor_Label[1], guiCreateFont("font.ttf", 12)) guiLabelSetColor ( GUIEditor_Label[1], 255, 0, 0 ) end end ) ----------------- addEventHandler ( "onClientGUIClick", root, function () if ( source == close ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end )
  16. Try this addEventHandler( "onClientResourceStart", resourceRoot, function( ) txd = engineLoadTXD("models/280.txd") engineImportTXD(txd, 280) dff = engineLoadDFF("models/280.dff", 0) engineReplaceModel(dff, 280) end )
  17. engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel
×
×
  • Create New...