-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
function start(player) vehicle = source addEventHandler("onClientRender", getRootElement(), startChecking) end function startChecking() if (getControlState(localPlayer, "vehicle_left")) then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end if (getControlState(localPlayer, "vehicle_right")) then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end end addEventHandler("onClientVehicleEnter", getRootElement(), start)
-
resources not resource. That's what I said in the last post.
-
function start(player) vehicle = source addEventHandler("onClientRender", getRootElement(), startChecking) end function startChecking() if (getControlState(player, "vehicle_left")) then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end if (getControlState(player, "vehicle_right")) then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end end addEventHandler("onVehicleEnter", getRootElement(), start) Add on vehicle exit and remove the onClientRender event handler
-
How do you expect the player to be clicking on vehicle_left when he's entering the vehicle. You should attach a handler to onClientRender which will check if the player is pressing vehicle_left.
-
Try: addEventHandler("onVehicleEnter", getRootElement(), function(player) local vehicle = source if getControlState(player, "vehicle_left") then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end if getControlState(player, "vehicle_right") then setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) setVehicleOverrideLights(vehicle, 1) setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle,0) end end)
-
It's not, you should create a directory with the name "resources" and put the resources in it.
-
Ah, I didn't look at the last picture.
-
2 Resources uploaded by Castillo someone has stolen his community account. https://community.multitheftauto.com/ind ... ls&id=2660 https://community.multitheftauto.com/ind ... ls&id=2659
-
You are hosting it yourself? If so, open command prompt , type ipconfig , get the ip, usually starts with 192.168. , and use that ip to enter your server.
-
You welcome, don't double post.
-
Dude, the file that contains the resource files, the file that meta.xml is in. And maybe a file making this not the resource.
-
The file's name, which contains the meta.xml.
-
You must change the resource name, not the file.
-
The name of the resource must have spaces or symbols, change it to a name without spaces, dots.
-
JRBank v 1.0.0 About: A realistic bank system made from scratch by me. It uses SQLite, to save accounts and balance, a player can open more than one account, there is settings in the meta for MaxAccounts (with serial). Stable and working with 1.0.5. Features: Opening more than one account, there is settings for MaxAccounts. Closing accounts, and you will withdraw all the money in it. Changing name and password of the account. Like a real ATM ... you have to select the amount by clicking the buttons. Deposit, Withdraw and Transfer. Transfer to account or player, if account the money will be transferred to the account, if player then a grid list containing all the accounts (with the same serial as the player's) and the player will choose which account to deposit the transferred money in. Last action ... the last action you made whether it's deposit, withdraw or transfer. Remember name and password. Moving fading GUI when opening the bank 3 Ways of adding banks, map (made EDF for it), Banks.xml, JRBank_createBank - JRBank_createATM functions, There is settings in the meta for how to add banks. (all supported) 14 Exported functions. Meta.xml Settings: AddingBanks: How to add banks, by maps, by Banks.xml, by functions, or all. MaxAccounts: Number of max accounts for one serial. BindKey: The key used to open the GUI when standing on a bank marker. CaseSensitive: Whether Names and passwords are case sensitive or not. AllowInterest: Every hour there will be interest if this is true. Interest: Interest , The interest - example: 0.01 = 0.01 interest on the account's balance ( +1 will be added to the value!! So the value is only the interest ). Screenshots: NOTE: The screens are MTA 1.1, but it only works with 1.0.5 Credits: Remp: for the guieditor. DarkLink: Some ideas suggestions. Links: Download Wiki page If you are going to use any of the exported functions then I would recommend you to see the wiki page first. Any Ideas, bugs, questions post them please or pm me.
-
And it's outputChatBox not outPutChatBox Also when return is used the function stops, so outputChatBox should be before return. function isReallyInsideRadarArea ( theArea, x, y ) local posX, posY = getElementPosition ( theArea ) local sizeX, sizeY = getRadarAreaSize ( theArea ) return (x >= posX) and (x <= posX + sizeX) and (y >= posY) and (y <= posY + sizeY) end function isElementInsideRadarArea(thePlayer,radar) local X,Y = getElementPosition(thePlayer) outputChatBox("Test",root, 255,0,0) return isReallyInsideRadarArea(radar,X,Y) end
-
radar = createRadarArea(2444,-1720,100,100) color = setRadarAreaColor(radar,255,255,0,255) function createCommand ( thePlayer, command,gangname, r, g, b ) setElementData(thePlayer,"gang",gangname) local radar = createRadarArea(2444,-1720,100,100) setRadarAreaColor(radar,r,g,b,255) g= getElementData(thePlayer,"gang") outputChatBox ("The gang "..g.." has been sucessfuly created!", thePlayer, 255, 0, 0, false ) end addCommandHandler ( "creategang", createCommand ,gangname)
-
That's because you setting the radar area color alpha to 0 radar = createRadarArea(2444,-1720,100,100) color = setRadarAreaColor(radar,255,255,0,255) function createCommand ( thePlayer, command,gangname ) setElementData(thePlayer,"gang",gangname) g= getElementData(thePlayer,"gang") outputChatBox ("The gang "..g.." has been sucessfuly created!", thePlayer, 255, 0, 0, false ) end addCommandHandler ( "creategang", createCommand ,gangname)
-
By changing "King" in setElementData to gangname function createCommand ( thePlayer, command,gangname ) setElementData(thePlayer,"gang",gangname) g= getElementData(thePlayer,"gang") outputChatBox ("The gang "..g.." has been sucessfuly created!", thePlayer, 255, 0, 0, false ) end addCommandHandler ( "creategang", createCommand ,gangname)
-
And inside the resources extract the resources.