-
Posts
575 -
Joined
Everything posted by codeluaeveryday
-
Can you be a bit more specific about this, what exactly are you trying to accomplish, and is it protected by a authentication system?
-
Thanks Brandon for your reply, let me know if you have any suggestions before I release it.
-
Good luck, people have tried this before and never completed it. Please do not think my MSN messenger is like this code, trust me, it's completely different.
-
NOTE: Project will begin after I update my maplikes resource. Hello MTA:SA community, I know what you are thinking, your thinking it's been done before, we see PM messengers everywhere. Well you may have noticed I said MSN! Yeah I freaking meant it, I will be making an advanced compiled resource which will allow you to instant message all of your MSN contacts, this project will take a few months or less, I am working by myself! If you would like to help contribute to the project you are welcome to create a base GUI, until then I will start small and create a function library. This resource will require the module ml_sockets and I will have a detailed tutorial on installing this. I am 95% sure that no one has ever made this on MTA:SA. Project Name: MSN Messenger 0.1 Features: --> Live messaging with other contacts --> Buddy requests --> Automatic updater --> Status updates --> Notifications bar --> Much more! I have one concern about releasing this resource, I am worried that people may use it to hack MSN accounts, so to solve this, I will do my best to provide a top level encyption, if you would like to donate an encryption method to this resource, please post it at our google code page. If you believe you are capable of assisting us then please post contact me on skype: Chrisinater22. Google Code page: http://code.google.com/p/msn-messenger-mtasa/ I am currently on holidays, but when I get back, I will work on this epically awesometastic code. I wish you all the best Easter, and have a great week! Yours sincerely, Chris!
-
[TUT] Updating admin countries (Manual & Automatic)
codeluaeveryday replied to codeluaeveryday's topic in Tutorials
The reason I said both was so incase my automatic code was to become outdated it would not work anymore, people would be able to use the manual. NOTE: PLEASE REPORT ANY BUGS WITH AUTOMATIC DOWNLOADER, THIS WAY I CAN WORK ON AN UPDATE FOR IT. -
Hey people, you may have noticed my mapinfo resource on the community which I released a long time ago, I have been completely ignoring the fact about how much CPU usage it took up, and now I have decided to make a faster version, the code is a lot more easier to read and add more features into. I am sorry too all people which have suffered from slow servers due to me. It will now be using DX Drawing functions instead of noobish images. Outdated Resource: https://community.multitheftauto.com/index.php?p= ... ls&id=4041 Updated Features: --> Shows map name --> Shows map author --> Shows map views --> Shows creation date --> Shows map rating --> Shows map likes / dislikes Future features: --> Global rating (all servers) --> Global views --> Online viewable database, you will be able to read the data of these maps online. I hope you all enjoy this little update, this updating will be completed when I'm 100% available!
-
[TUT] Updating admin countries (Manual & Automatic)
codeluaeveryday replied to codeluaeveryday's topic in Tutorials
I love you guys, being the first to comment, i have to know which one are you using? Manual or Automatic, I love automatic, it saves me a lot of time. New tutorial comming, your all gonna love it. -
So, I am currently having a massive problem with my basic ass PHP code and you can't accuse me of being a retarded PHP newbie. It's quite basic, I am just getting server data and trying to load it to the webpage. <?php include( "mta_sdk.php" ); $hostname = "95.143.38.5"; $port = 22000; $username = "csmit195"; $password = "fuckyou"; $resourceName = "main"; $mtaServer = new mta( $hostname, $port, $username, $password ); $resource = $mtaServer->getResource ( $resourceName ); $returns[] = $resource->call ( "getServerStats" ); echo $returns[1]."/n"; echo $returns[2]."/n"; echo $returns[3]; ?> Notes to prevent questions: Yes thats the HTTP port, its shared with the server port. Yes the export function with the HTTP attribute is active. The actual '/main/call/getServerStats' is returning the correct data, so I'll work on another php file instead of using MTA SDK as its bugged and doesn't authenticate. Error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to 95.143.38.5:22000' in /home/a7765795/public_html/mta_sdk.php:146 Stack trace: #0 /home/a7765795/public_html/mta_sdk.php(79): mta->do_post_request('95.143.38.5', 22000, '/main/call/getS...', '') #1 /home/a7765795/public_html/mta_sdk.php(257): mta->callFunction('main', 'getServerStats', Array) #2 /home/a7765795/public_html/Sources/PortalBlocks.php(3561) : eval()'d code(12): Resource->call('getServerStats') #3 /home/a7765795/public_html/Sources/PortalBlocks.php(3561): eval() #4 /home/a7765795/public_html/Sources/Load.php(2170) : eval()'d code(222): sp_php(Array, '19') #5 /home/a7765795/public_html/Sources/Load.php(2170) : eval()'d code(139): template_block_curve(Array) #6 /home/a7765795/public_html/Sources/Load.php(2170) : eval()'d code(31): template_block(Array) #7 /home/a7765795/public_html/Sources/Load.php(1882): template_portal_above() #8 /home/a7765795/public_html/Sources/Subs.php(3402): loadSubTemplate('portal_above', true) #9 /home/a7765795 in /home/a7765795/public_html/mta_sdk.php on line 146 Thanks in advance fellow coders, Chris Smith
-
You cannot enter vehicles which are created in the clientside, try converting it to serverside.
-
ATTENTION!!! If anyone experienced a bug which froze the server, please read the instructions down the bottom. Hey guys! I am back with another awesome tutorial! Today I will be showing all you people how to update the 'Admin' resource's country list. Some of you may have noticed my other tutorial, well if you had problems with that one, go ahead and use this one! I have a special treat here! Lets begin. Automatic: The fastest way known to man! Steps Replace your 'server/admin_ip2c.lua' file with this pastebin document Restart admin, and simple type /updateadmin, then it will begin downloading and installing it, it will say its done, then you need to restart the resource. Manual: The long way of everything! Steps Firstly you will need to download the updated database from HERE Once you've completed that step you will now need to open your admin folder and navigate to: ':admin/config' folder Now you want to extract the 'IpToCountry.csv' from the zip file to the ':admin/config' folder You will now need to change a setting in admin to allow this feature, open up the ':admin/server/admin_ip2c.lua' file, now search for the 'makeAndTestCompactCsv' variable and set it to true Now you are ready to begin installing it! Go ahead and restart admin panel In the server type the command: 'makecsv' and wait for 'makeCompactCsv done' to appear in the console Now it is essential that you set the 'makeAndTestCompactCsv' variable back to false so people don't mess around with it It's time for the very last part! All you have to do is restart the 'admin' resource Congratulations kids, you've officially upgraded your 'admin' resource, remember to do this on a regular basis, this IP database is updated every few hours. I wish you all the best Easter, suck chocolate for as long as you can, peace out! EDIT: Working on a new update to help out all the new kids.
-
Makes sure all the required files exist: ^^ It has a typo, make sure that's correct. ^^ Is the O suppose to be capitalized?
-
Make sure the label is the same width and height, and position as the button, then you should be fine.
-
You need to destroy the other vehicle: addEvent ( "spawnPlane", true ) addEventHandler ( "spawnPlane", root, function ( vehicleName, oldVehicle ) local vehicleModel = getVehicleModelFromName ( vehicleName ) if ( vehicleModel ) then -- add this to get spawn the vehicle in your exact position of the maker local x, y, z = getElementPosition ( source ) local vehicle = createVehicle ( vehicleModel, 1690.14868, 1453.82971, 10.76650, 0, 0, 0 ) warpPedIntoVehicle ( source, vehicle ) outputChatBox ("#1874CDMake your way to Las Venturas Airport to pick up your plane!", source,24,116,205, true) end end ) You will also need to pass the oldVehicle element in the triggerServerEvent.
-
No problemo hombre.
-
help .. the gui is visibile for all players
codeluaeveryday replied to golanu21's topic in Scripting
Woops, didn't see the second page. -
Honest mistake: function getAliveRacers() local count = 0 for i, v in ipairs(getElementsByType('player')) do if getElementData(v, 'state') == 'alive' then count = count + 1 end end return count end setTimer (function () local intplayers = getAliveRacers() outputChatBox (intplayers, root) end, 500,0) Edit: Me and castillo pressed it practically at the same time.
-
help .. the gui is visibile for all players
codeluaeveryday replied to golanu21's topic in Scripting
INCORRECT: addEventHandler("onClientMarkerHit", Marker1, function () guiSetVisible(fereastra, true) showCursor(true) end) This is triggered when anyone hits the marker, so no wonder this is happening, so use this. CORRECT: addEventHandler("onClientMarkerHit", Marker1, function (hitPlayer, matchingDimension) if hitPlayer == localPlayer then guiSetVisible(fereastra, true) showCursor(true) end end) -
I swear on my own life that my code was working, I tested it with all my scripts.
-
This error can be fixed by opening the meta.xml file in Admin panel, and you will see settings, one will be about security level, just change that to a different value.
-
addEventHandler('onPlayerWasted', getRootElement(), function(totalAmmo, killer, killerWeapon, bodypart) if killer and killer ~= source then stars = math.random(3, 5) setPlayerWantedLevel(killer, stars) outputChatBox('You have killed '..getPlayerName(source):gsub('#%x%x%x%x%x%x', '')..', you will now get '.. tostring(stars)..' stars!', killer, 200, 155, 0) end end )
-
function getAliveRacers() local count = 0 for v in pairs(getElementsByType('player')) do if getElementData(v, 'state') == 'alive' then local count = count + 1 end end return count end setTimer (function () local intplayers = getAliveRacers() outputChatBox (intplayers, root) end, 500,0)
-
This is impossible, your code should be working, are you using the client-sided or server sided?
-
local Buttons = {[Button[1]] = true, [Button[2]] = true, [Button[3]] = true, [Button[4]] = true, [Button[5]] = true } addEventHandler("onClientMouseEnter",guiRoot, function ( ) if Buttons[source] then playSoundFrontEnd(3) end end ) EDITTED ^^ My code i sent you ^^ is working. Make sure that the buttons are created before the Buttons table, also make sure that there is a GUI parent element.
-
Woops lol, I was working with my other server, no wonder, I'll fix it asap.
-
So I think it's an MTA bug.