
xXMADEXx
Members-
Posts
2,718 -
Joined
-
Last visited
Everything posted by xXMADEXx
-
Can you post your whole client code?
-
Yes, but there are tons of other languages that do the same thing.
-
Hey guys. So I was just wondering if there is a reason that the MTA devs decided to use Lua for the scripting language, instead of something like Ruby or Python, or is it just something that they just decided because it was there? I don't know why I want to know this, but I was just curious. Thanks.
-
IT depends what you want. If you are going for speed, then you should use SQLIte, but if you're going to be editing a lot of data or checking a lot of data manually then I would recommend MySQL. Even if you want to pull data from the database from a remote server, then you should also use MySQL.
-
onPlayerLogin is a server event. You can use onClientResourceStart or trigger a client event when onPlayerLogin is triggered.
-
You should give some actual information...
-
He is saying that the circle is just moved and different sizes, not that the function isn't working. You have to use the function guiGetScreenSize with some basic math to make it the same size & same position in all resolutions.
-
This: local vehs = { } function vehiclecar ( ) if exports.vip_system:isPlayerDonator(source) then if ( isElement ( vehs [ source ] ) ) then -- Here the vehicle already exists end local x,y,z = getElementPosition ( source ) vehs [ source ] = createVehicle ( 411, x + 3, y, z + 1 ) outputChatBox("[VIP]Vehicle Created",source,255,255,0,false) end end addEvent( "vehiclecar", true ) addEventHandler( "vehiclecar", getRootElement(),vehiclecar )
-
As far as I know there isn't. I don't think there would be, but if there is you could just use a table.
-
You can't disable it, you just need to make your own ban function.
-
Try this: addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) if ( not teamName ) then return end local team = getTeamFromName ( teamName ) if ( not team ) then return end setPlayerTeam ( source , team ) outputChatBox("You changed your GANG to "..getTeamName(team).." Team.", source, 0, 255, 0) end )
-
Well obviously if the sound is 3D then yes. It's not a bug, that's how it suppose to be.
-
You could do something like this: local sx, sy = guiGetScreenSize ( ) local fontSize = ( ( sx / 1280 ) + ( sy / 960 ) ) * 1.2
-
You can do it by basic math, but other than that, there isn't a way.
-
Don't get me wrong here, but people aren't going to buy this, matter affect they don't typically buy resources individually (some do, but not most) especially of others can get it. When they do decide to buy a resource individually, not in a bundle deal or something, they are also going to want it to be custom.
-
Here is a basic example that I made: btn = guiCreateButton ( 20, 20, 100, 20, "Click Me", false ) addEventHandler ( "onClientGUIClick", btn, function ( ) triggerServerEvent ( "OnClientClickedTheButton", localPlayer ) -- Send the request to the server end ) addEvent ( "OnClientClickedTheButton_Client", true ) -- Handle the response from the server addEventHandler ( "OnClientClickedTheButton_Client", root, function ( player ) outputChatBox ( getPlayerName ( player ).." clicked the button!" ) end ) -- server side -- addEvent ( "OnClientClickedTheButton", true ) -- Handle the request from the client addEventHandler ( "OnClientClickedTheButton", root, function ( ) triggerClientEvent ( root, "OnClientClickedTheButton_Client", root, source ) -- Send a response to the client end )
-
Lol, actually it use windows 7 but I just use a custom theme.
-
You can use the command showcol to see what it's creating. (Developer mode must be enabled, setDevelopmentMode)
-
Using the function fetchRemote.
-
You can't use or like that. local acls = { "ORGANIZADOR", "MODERADOR", "ADMINISTADOR" ) function toggleGodMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) for i, v in pairs ( acls ) do if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( v ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("[ADMIN] GODMODE DEACTIVATED.",thePlayer,0,255,0) else setElementData(thePlayer,"invincible",true) outputChatBox("[ADMIN] GODMODE ACTIVATED.",thePlayer,0,255,0) end break end end end addCommandHandler("god",toggleGodMode)
-
Try using this: function warpPlayers() local d = getElementData ( localPlayer, "Your_Data" ) if ( d and d == 10 ) then exports.CSUtexts:output("10/10 players have signed in event, wait 10 seconds, to be warped.", 255, 255, 0) setTimer ( setElementDimension, 1000, 1, localPlayer, 5 ) else outputChatBox ( "Value of 'd': " .. tostring ( d ) ) end end
-
I can't wait for OOP to be implied to MTA
-
That'd be awesome lol Update Added how to create a basic resource (It's a video .-.)