-
Posts
862 -
Joined
-
Last visited
Everything posted by iMr.3a[Z]eF
-
can you capture the screen of the problem?
-
A sample of increasing hp with a hp limit. local healthUpdate = 10 local maxHealth = 100 addCommandHandler("testhealth", function(player) local currentHealth = getElementHealth(player) local newHealth = currentHealth+healthUpdate if newHealth < maxHealth then setElementHealth (player,newHealth) elseif currentHealth ~= maxHealth then -- data transfer saver. setElementHealth (player,maxHealth) end end) what is the "player" type?
-
do you mean you want to set it random colours when he entered the car or spawn him?
-
what function you are changing it event?
-
getElementHealth do it yourself
-
Try then tell us.
-
debugscript 3
-
bindKey setPedAnimation playSound or playSound3D And the item you have to create by yourself https://community.multitheftauto.com/in ... ls&id=2540
-
addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local zombiekills = getAccountData(account,"Zombie kills") or 0 if (zombiekills == 100) then outputChatBox ( "You have killed 100zombies!!!", source, 255, 255, 255 ) end end )
-
NO NEED to spawnPlayer while using setElementPosition
-
createMarker "onMarkerHit" -- event setElementPosition setElementDimension setElementInterior
-
and who is the player in if ( player == source ) then
-
https://community.multitheftauto.com/in ... ils&id=761
-
getPedWeapon is this what you need?
-
it's a lot try this one https://community.multitheftauto.com/in ... ls&id=5491
-
Since we can change licenseplate number now...
iMr.3a[Z]eF replied to DeletedAccount1111's topic in Scripting
i don't understand what yo say -
Since we can change licenseplate number now...
iMr.3a[Z]eF replied to DeletedAccount1111's topic in Scripting
What font? the MTA fonts? you can put font whenever you want guiCreateFont -
will i think you'll use dxDrawText then check of the player interior as @Ab-47 said Ex: function getHisInterior(thePlayer) local i = getElementInterior(thePlayer) local dxDrawText("he is in ".. i .." interior !",815,125,988,188, tocolor(0, 200, 0, 255), 1, "default-bold", "left", "top", false, false, false) end addEventHandler( "onClientResourceStart", resourceRoot, getHisInterior)
-
replace outputChatBox ( source.."has got the Hunter", getRootElement(), 255, 255, 255, true ) with outputChatBox ( " " ..source.. " has got the Hunter", getRootElement(), 255, 255, 255, true ) not tested...
-
You don't have to use setTimer because you can set timer at moveObject function Ex: local object = createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) moveObject ( object, 3000, 5540.6654, 1020.55122, 4338.268 ) *3000 = is the timer
-
the errors from the markers the aren't defined
-
in Other words: where are the other makers?.
-
ServerSide: no Tested GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.4324,0.5246,0.3469,0.237,"Bank",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,23,50,15,"Amount",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(63,22,229,20,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(9,48,93,21,"Deposit",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(110,48,93,21,"Withdraw",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(11,77,75,15,"Bank balance: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Label[3] = guiCreateLabel(11,96,81,15,"Cash in hands: ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) --[[GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,"[bANK]",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false)--]] --[[GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(kasa),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false)--]] GUIEditor_Button[3] = guiCreateButton(214,48,78,21,"Close",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) addEvent("CLBankGUI", true) addEvent("DepozytBank", true) addEvent("WyplacBank", true) addEvent("potrzebujeBankBalance", true) addEvent("otoBalans", true) addEvent("bankBalanceChat", true) function dzingi () guiSetVisible(GUIEditor_Window[1], true) triggerServerEvent("potrzebujeBankBalance", getLocalPlayer()) --setElementData(bankUser, "bankCash", GUIEditor_Label[4]) --setElementData(bankUser, "HandsCash", GUIEditor_Label[5]) end addEventHandler( "CLBankGUI", getRootElement(), dzingi ) function createLabelDzingi (balans) destroyElement(GUIEditor_Label[4]) destroyElement(GUIEditor_Label[5]) local BANKBALANCE = tostring(balans) local bankUser = getLocalPlayer() local HandsCash = getPlayerMoney(bankUser) GUIEditor_Label[4] = guiCreateLabel(93,77,203,17,tostring(BANKBALANCE),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Label[5] = guiCreateLabel(95,96,202,15,tostring(HandsCash),false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) end addEventHandler( "otoBalans", getRootElement(), createLabelDzingi ) function BankGUI() guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler( "CLBankGUI", getRootElement(), BankGUI ) function Depozyt(thisPlayer,button,state) local thisPlayer = getLocalPlayer() local money = getPlayerMoney(thisPlayer) local amount = guiGetText(GUIEditor_Edit[1]) if( tonumber(money) >= tonumber(amount)) then triggerServerEvent ("DepozytBank", getLocalPlayer(), amount) else outputChatBox("Do you wanna deposit more than you have?", 255, 0, 0) end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], Depozyt, false) function Wyplac(button,state) local amount = guiGetText(GUIEditor_Edit[1]) triggerServerEvent ("WyplacBank", getLocalPlayer(), amount) end addEventHandler("onClientGUIClick", GUIEditor_Button[2], Wyplac, false) function Zamknij(button,state) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[3], Zamknij, false) function chatBank ( ) triggerServerEvent ("chatBank", getLocalPlayer()) end addCommandHandler ( "bank", chatBank ) function BankChatBalance(balans) local theplayer = getLocalPlayer() local playerName = getPlayerName(theplayer) outputChatBox( playerName .. "'s bank balance: $" .. balans .. "!", 255, 255, 0 ) end addEventHandler( "bankBalanceChat", getRootElement(), BankChatBalance )