Jump to content

BEN.

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by BEN.

  1. https://wiki.multitheftauto.com/wiki/GuiGetScreenSize
  2. https://wiki.multitheftauto.com/wiki/GetPlayerWantedLevel
  3. At line 15 should be elseif
  4. use guiSetVisible function for hide/show your GUI elements https://wiki.multitheftauto.com/wiki/GuiSetVisible
  5. triggerServerEvent addEvent
  6. BEN.

    help

    addEventHandler("onClientGUIClick",heal, function () health = getElementHealth(localPlayer) walo=getPlayerMoney(localPlayer) if (walo<3000) and (health<=100) then outputChatBox("you Don't have enough money",200,0,0) elseif (health>=100) and (walo>=3000) then outputChatBox("your health is already full",30,200,0) elseif (walo>=3000) and (health<=100) then setElementHealth(localPlayer,20) takePlayerMoney(3000) outputChatBox("you have bought medicine",20,30,200) end end) https://wiki.multitheftauto.com/wiki/GetLocalPlayer
  7. BEN.

    help

    getResources
  8. gridlist is not defined
  9. https://wiki.multitheftauto.com/wiki/Sc ... Tutorial_1
  10. you can make marker on client side too because it shared function
  11. BEN.

    [HELP] Faction

    try this function fbskin(thePlayer) local fac = getElementData(thePlayer,"Faction") local rank = getElementData(thePlayer,"Rank") if (fac == 4) then if (rank == 0) then setElementModel(thePlayer,117) elseif (rank == 1) then setElementModel(thePlayer,163) elseif (rank == 2) then setElementModel(thePlayer,164) elseif (rank == 3) then setElementModel(thePlayer,286) elseif (rank == 4) then setElementModel(thePlayer,166) elseif (rank == 5) then setElementModel(thePlayer,165) end else outputChatBox ( "Вы здесь не работаете!", thePlayer, 0,191,255 ) end end addEventHandler( "onMarkerHit", fbpickup, fbskin)
  12. function GUI(hitPlayer) if hitPlayer == localPlayer then showCursor(true) guiSetVisible(yourGridList,true) end end addEventHandler("onClientMarkerHit", yourMarker, GUI)
  13. setWeaponProperty
  14. I think setElementModel will better. Use it
  15. Oh really but now I don't have a problems with it
  16. Don't write 2 end after function and try this function skin1 () nanosuitTXD = engineLoadTXD("nanosuit.txd") engineImportTXD(nanosuitTXD, 23 ) nanosuitDFF = engineLoadDFF("nanosuit.dff") engineReplaceModel(nanosuitDFF, 23) setPedSkin(localPlayer,23) end function skin2 () anonymousTXD = engineLoadTXD("anonymous.txd") engineImportTXD(anonymousTXD, 24 ) anonymousDFF = engineLoadDFF("anonymous.dff") engineReplaceModel(anonymousDFF, 24) setPedSkin(localPlayer,24) end function skin3 () screamTXD = engineLoadTXD("scream.txd") engineImportTXD(screamTXD, 25 ) screamDFF = engineLoadDFF("scream.dff") engineReplaceModel(screamDFF, 25) setPedSkin(localPlayer,25) end
  17. BEN.

    Problem again

    open window on F3 bindKey("F3","down", function() local state = (not guiGetVisible(GUIEditor.window[1])) guiSetVisible(GUIEditor.window[1],state) showCursor(state) end)
  18. BEN.

    Problem again

    engineReplaceModel function skin1 () nanosuitTXD = engineLoadTXD("nanosuit.txd") engineImportTXD(nanosuitTXD, 23 ) nanosuitDFF = engineLoadDFF("nanosuit.dff") engineReplaceModel(nanosuitDFF, 23) end function skin2 () anonymousTXD = engineLoadTXD("anonymous.txd") engineImportTXD(anonymousTXD, 24 ) anonymousDFF = engineLoadDFF("anonymous.dff") engineReplaceModel(anonymousDFF, 24) end function skin3 () screamTXD = engineLoadTXD("scream.txd") engineImportTXD(screamTXD, 25 ) screamDFF = engineLoadDFF("scream.dff") engineReplaceModel(screamDFF, 25) end
  19. it's work as you wanted You have one button without any parents.Your button as guiRoot function ylay() wa = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) showCursor(true) end addCommandHandler ( "y", ylay ) function wia() destroyElement (wa) showCursor(false) end addEventHandler ("onClientGUIClick",guiRoot,wia)
  20. You have only one button without parents in your code and you will click only on this button
  21. also addEventHandler("onClientGUIClick", Button, delete, false) you kow why false? https://wiki.multitheftauto.com/wiki/In ... ng_the_GUI
  22. you don't need destroyElement when you can hide it with guiSetVisible local Button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) guiSetVisible(Button,false) function create() guiSetVisible(Button,true) showCursor(true) end addCommandHandler ( "y", create ) function delete() showCursor(false) guiSetVisible(Button,false) end addEventHandler("onClientGUIClick", Button, delete, false)
  23. BEN.

    Errors

    https://wiki.multitheftauto.com/wiki/BindKey this example bind key to open gui on F3 bindKey("F3","down", function() local key = (not guiGetVisible(GUIEditor.window[1])) guiSetVisible(GUIEditor.window[1],key) showCursor(key) end)
  24. BEN.

    Button Help

    https://wiki.multitheftauto.com/wiki/OnClientGUIClick local button1 = guiCreateButton(0.1,0.1,0.5,0.5,"Press",true) function example() --your code end addEventHandler("onClientGUIClick", button1, example, false)
×
×
  • Create New...