
BEN.
Members-
Posts
56 -
Joined
-
Last visited
Everything posted by BEN.
-
https://wiki.multitheftauto.com/wiki/GuiGetScreenSize
-
https://wiki.multitheftauto.com/wiki/GetPlayerWantedLevel
-
At line 15 should be elseif
-
use guiSetVisible function for hide/show your GUI elements https://wiki.multitheftauto.com/wiki/GuiSetVisible
-
triggerServerEvent addEvent
-
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
-
gridlist is not defined
-
https://wiki.multitheftauto.com/wiki/Sc ... Tutorial_1
-
you can make marker on client side too because it shared function
-
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)
-
function GUI(hitPlayer) if hitPlayer == localPlayer then showCursor(true) guiSetVisible(yourGridList,true) end end addEventHandler("onClientMarkerHit", yourMarker, GUI)
-
I think setElementModel will better. Use it
-
Oh really but now I don't have a problems with it
-
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
-
open window on F3 bindKey("F3","down", function() local state = (not guiGetVisible(GUIEditor.window[1])) guiSetVisible(GUIEditor.window[1],state) showCursor(state) end)
-
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
-
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)
-
You have only one button without parents in your code and you will click only on this button
-
also addEventHandler("onClientGUIClick", Button, delete, false) you kow why false? https://wiki.multitheftauto.com/wiki/In ... ng_the_GUI
-
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)
-
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)
-
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)