shay103

Members
  • Content count

    48
  • Joined

  • Last visited

Community Reputation

3 Neutral

1 Follower

About shay103

  • Rank
    Rat

Details

  • Gang
    Grove
  • Location
    Grove St
  • Occupation
    Selling Drugs
  1. help me with the script

    the default mta resource known as admin has a function to get the players country from their ip address, I suggest you look into that.
  2. Scripting Godmode for specific Team

    I may be able to help with this. -- You may use either one of these, or both if u choose. I suggest though to use only one, preferably acl. -- Using Tables to define who should get godmode. local godmodeTeams = {'Staff Team','Godmode Team'} -- Using tables gives you the benefit of adding infinite teams. function setTeamGodmode() for i,v in pairs(godmodeTeams) do for l,p in pairs(getElementsByType('player')) do local team = getPlayerTeam(p) if team then local teamName = getTeamName(team) if getTeamFromName(v) then if v == teamName then setElementData(p,'invincible',true) else setElementData(p,'invincible',false) end end end end end end -- Doing the same thing only with ACL instead of teams.. local godmodeACL = {'Admin','Super Moderator'} -- this function is for ACL function setACLGodmode() for o,u in pairs(godmodeTeams) do for k,e in pairs(getElementsByType('player')) do local acc = getPlayerAccount(e) if acc then local accName = getAccountName(acc) if aclGetGroup(u) then if isObjectInACLGroup('user.'..accName,aclGetGroup(u)) then setElementData(e,'invincible',true) else setElementData(e,'invicible',false) end end end end end end -- to trigger these is simple, either put the function in a function as setACLGodmode() or in a timer as setACLGodmode, etc. setTimer(setACLGodmode,1000,0) -- these timers are not needed, unless u want them, they will check every second to see if all the players get godmode. setTimer(setTeamGodmode,1000,0)
  3. Vehicle Car

    I hope this code helps, the first example is using it to destroy all cars that are empty and the second example is destroying all cars that are empty with only specific data, in case you don't want certain vehicles destroyed. You may find unnecessary things within this code, such as so many if statements, but I like to run these 'checks' to get rid of any possible errors or warnings within the script, it makes everything run smoothly.
  4. help with a hidden marker

    instead of this - local marker = createMarker ( ax, ay, 0, "checkpoint", aradius, r or 255, g or 255, b or 255, 0 ) setElementAlpha(marker, 0) try this - local marker = createMarker ( ax, ay, 0, "checkpoint", aradius, tocolor( r or 255, g or 255, b or 255, a or 0 ) )
  5. MTA Offline Wiki

    I've not worked on this in a long while, I may start on it again, possibly even rescript it to be a lot better. I plan for the following. Easy Navigation Both Online and Offline Search Support Syntax Highlighting in the Text Editor (multiple languages) Better, nicer, cleaner, more techy appearance.
  6. Modules

    That sucks :l
  7. Modules

    I want to start developing modules to change the way mta sa runs. I basically want to make a ragdoll module for pedestrians and players. To do this I would need the ml_base.so file, or the ml_devkit, whatever is used to make your own modules. I cannot seem to download this because the download is blocked because of stupid certificates. I'm wondering if anyone could give me a copy of the module development kit. If you would, I'd greatly appreciate it.
  8. File Loading and Editing

    I want to use a script to make a custom help.xml file that updates everytime a setting is changed, and settings can only change when the script restarts so it makes it perfect. Settings are within the lua file as variables. I also have a setting in the lua file which determines whether or not to even have a help.xml file. For some reason I couldn't get this to work. I basically wanted to open and then modify the meta.xml to put the help.xml in it when the setting is set to 'true' and then when it is false I wanted to remove that help.xml from the meta.xml. Unfortunately, files will not create, files will not be read, files will not be written, and no errors or warnings are produced. My friend suggested that I use xml functions to do this, but they are not for what I want to do. They are for saving data, not setting/replacing text in a file. I would like some help on this part of my project, in an attempt to get it functional. I will post the current code below. function makeHelpFile() local meta = 'meta.xml' local directory = 'help.xml' if not fileExists(directory) then local file = fileCreate(directory) fileClose(file) end local helpFile = fileOpen(directory) local helpSize = fileGetSize(helpFile) local helpBuffer = fileRead(helpFile,helpSize) local metaFile = fileOpen(meta) local metaSize = fileGetSize(metaFile) local metaBuffer = fileRead(metaFile,metaSize) if string.find(metaBuffer,'</meta>',1,true) then local text = string.gsub(metaBuffer,'</meta>','<config src="help.xml" type="client"/>\n</meta>') fileWrite(metaFile,text) fileClose(metaFile) end end
  9. Circle Progress bar

    dxDrawCircle is not an MTA function I do not believe, so the code they give you is code that you need in your script, if you have not already added it, then you call that function. I've made a progress bar before only with rectangles instead of circles. I'm not quite sure how you would work it with a circle but with rectangles, I drew a rectangle with a lower alpha and then used a count system so that each time the screen rendered a frame the progress went up 0.5% This moved the second bar with a higher alpha, over top of the bar with a lower alpha, making it look like a progress bar. Although I'm sure you could make a 'real' progress bar by getting the load progress and then dividing it by 100 or using it as is, and just keep updating that second rectangle. Again as I said before, I've done this with rectangles, not circles, I'm not sure if this will be helpful or not. Good luck. I have just checked the script for dxDrawCircle, you can indeed set the angle of the circle. I advise you to make a default first angle and then set the second angle to the progress, note that this needs to be a 0-360 value, so if your using progress 0-100% you'll need to multiply your progress by 3.6. It will look like this startAngle+(progress*3.6) = endAngle heres a check for it to reset if need be, or stop at the correct place. if endAngle > 360 then endAngle = 0 end and if you want to draw the percent that the angle is at you can use endAngle/360 = circlePercent. I believe this is how it should work. Again I wish you the best of luck.
  10. DX Login

    I'm trying to make a DX Login system for my server. I ran into a snag. Only the username button for the login line changes color when you hover your mouse, but it only changes color when you hover over the register button. I'm new to client side scripting, I'm asking for help with this script. local x,y = guiGetScreenSize() local r = {} local g = {} local b = {} local a = {} local range = {} function isMouseWithinRangeOf(psx,pssx,psy,pssy) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*x,cy*y if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then return true,cx,cy else return false end end addEventHandler("onClientRender",root,function() showCursor(true) window = dxDrawRectangle(0,0,x,y,tocolor(0,0,0,255),false) mainText = dxDrawText("Welcome!\nPlease Login or Register",x*0.1603,y*0.0729,x*0.8338,y*0.1940,tocolor(255,255,255,255),1.30,"pricedown","center","center",false,false,false,false,false) if not r['loginUsernameBox'] then r['loginUsernameBox'] = 255 end if not g['loginUsernameBox'] then g['loginUsernameBox'] = 255 end if not b['loginUsernameBox'] then b['loginUsernameBox'] = 255 end if not a['loginUsernameBox'] then a['loginUsernameBox'] = 255 end loginUsernameBox = dxDrawRectangle(x*0.1676,y*0.2760,x*0.1735,y*0.0573,tocolor(r['loginUsernameBox'],g['loginUsernameBox'],b['loginUsernameBox'],a['loginUsernameBox']),false) range['loginUsernameBox'] = {isMouseWithinRangeOf(x*0.1676,x*0.1735,y*0.2760,y*0.3359),'loginUsernameBox'} loginUsernameText = dxDrawText("Username",x*0.1676,y*0.2760,x*0.3412,y*0.3359,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['loginPasswordBox'] then r['loginPasswordBox'] = 255 end if not g['loginPasswordBox'] then g['loginPasswordBox'] = 255 end if not b['loginPasswordBox'] then b['loginPasswordBox'] = 255 end if not a['loginPasswordBox'] then a['loginPasswordBox'] = 255 end loginPasswordBox = dxDrawRectangle(x*0.3603,y*0.2760,x*0.1735,y*0.0573,tocolor(r['loginPasswordBox'],g['loginPasswordBox'],b['loginPasswordBox'],a['loginPasswordBox']),false) range['loginPasswordBox'] = {isMouseWithinRangeOf(x*0.3603,x*0.1735,y*0.2760,y*0.0573),'loginPasswordBox'} loginPasswordText = dxDrawText("Password",x*0.3603,y*0.2760,x*0.5338,y*0.3359,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['loginBox'] then r['loginBox'] = 255 end if not g['loginBox'] then g['loginBox'] = 255 end if not b['loginBox'] then b['loginBox'] = 255 end if not a['loginBox'] then a['loginBox'] = 255 end loginBox = dxDrawRectangle(x*0.6257,y*0.2760,x*0.1735,y*0.0573,tocolor(r['loginBox'],g['loginBox'],b['loginBox'],a['loginBox']),false) range['loginBox'] = {isMouseWithinRangeOf(x*0.6257,x*0.1735,y*0.2760,y*0.0573),'loginBox'} loginText = dxDrawText("Login",x*0.6257,y*0.2760,x*0.7993,y*0.3359,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['registerUsernameBox'] then r['registerUsernameBox'] = 255 end if not g['registerUsernameBox'] then g['registerUsernameBox'] = 255 end if not b['registerUsernameBox'] then b['registerUsernameBox'] = 255 end if not a['registerUsernameBox'] then a['registerUsernameBox'] = 255 end registerUsernameBox = dxDrawRectangle(x*0.1676,y*0.4245,x*0.1735,y*0.0573,tocolor(r['registerUsernameBox'],g['registerUsernameBox'],b['registerUsernameBox'],a['registerUsernameBox']),false) range['registerUsernameBox'] = {isMouseWithinRangeOf(x*0.1676,x*0.1735,y*0.4245,y*0.0573),'registerUsernameBox'} registerUsernameText = dxDrawText("Username",x*0.1676,y*0.4245,x*0.3412,y*0.4844,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['registerEmailBox'] then r['registerEmailBox'] = 255 end if not g['registerEmailBox'] then g['registerEmailBox'] = 255 end if not b['registerEmailBox'] then b['registerEmailBox'] = 255 end if not a['registerEmailBox'] then a['registerEmailBox'] = 255 end registerEmailBox = dxDrawRectangle(x*0.1676,y*0.4974,x*0.1735,y*0.0573,tocolor(r['registerEmailBox'],g['registerEmailBox'],b['registerEmailBox'],a['registerEmailBox']),false) range['registerEmailBox'] = {isMouseWithinRangeOf(x*0.1676,x*0.1735,y*0.4974,y*0.0573),'registerEmailBox'} registerEmailText = dxDrawText("Email",x*0.1676,y*0.4974,x*0.3412,y*0.5573,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['registerPasswordBox'] then r['registerPasswordBox'] = 255 end if not g['registerPasswordBox'] then g['registerPasswordBox'] = 255 end if not b['registerPasswordBox'] then b['registerPasswordBox'] = 255 end if not a['registerPasswordBox'] then a['registerPasswordBox'] = 255 end registerPasswordBox = dxDrawRectangle(x*0.3603,y*0.4245,x*0.1735,y*0.0573,tocolor(r['registerPasswordBox'],g['registerPasswordBox'],b['registerPasswordBox'],a['registerPasswordBox']),false) range['registerPasswordBox'] = {isMouseWithinRangeOf(x*0.3603,x*0.1735,y*0.4245,y*0.0573),'registerPasswordBox'} registerPasswordText = dxDrawText("Password",x*0.3603,y*0.4245,x*0.5338,y*0.4844,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['registerRetypePasswordBox'] then r['registerRetypePasswordBox'] = 255 end if not g['registerRetypePasswordBox'] then g['registerRetypePasswordBox'] = 255 end if not b['registerRetypePasswordBox'] then b['registerRetypePasswordBox'] = 255 end if not a['registerRetypePasswordBox'] then a['registerRetypePasswordBox'] = 255 end registerRetypePasswordBox = dxDrawRectangle(x*0.3603,y*0.4974,x*0.1735,y*0.0573,tocolor(r['registerRetypePasswordBox'],g['registerRetypePasswordBox'],b['registerRetypePasswordBox'],a['registerRetypePasswordBox']),false) range['registerRetypePasswordBox'] = {isMouseWithinRangeOf(x*0.3603,x*0.1735,y*0.4974,y*0.0573),'registerRetypePasswordBox'} registerRetypePasswordText = dxDrawText("Repeat Password",x*0.3603,y*0.4974,x*0.5338,y*0.5573,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) if not r['registerBox'] then r['registerBox'] = 255 end if not g['registerBox'] then g['registerBox'] = 255 end if not b['registerBox'] then b['registerBox'] = 255 end if not a['registerBox'] then a['registerBox'] = 255 end registerBox = dxDrawRectangle(x*0.6257,y*0.4245,x*0.1735,y*0.0573,tocolor(r['registerBox'],g['registerBox'],b['registerBox'],a['registerBox']),false) range['registerBox'] = {isMouseWithinRangeOf(x*0.6257,x*0.1735,y*0.4245,y*0.0573),'registerBox'} registerText = dxDrawText("Register",x*0.6257,y*0.4245,x*0.7993,y*0.4844,tocolor(0,0,0,254),1.10,"default-bold","center","center",false,false,false,false,false) updatesBox = dxDrawRectangle(x*0.1676,y*0.5807,x*0.6588,y*0.3490,tocolor(255,255,255,255),false) updatesText = dxDrawText("Updates will be posted here!",x*0.1676,y*0.5807,x*0.8265,y*0.9297,tocolor(0,0,0,254),1.00,"default","left","top",false,false,false,false,false) rememberMeText = dxDrawText("Remember Me",x*0.6257,y*0.3490,x*0.7346,y*0.3841,tocolor(255,255,255,255),1.00,"default-bold","right","center",false,false,false,false,false) if not r['rememberMeOffBox'] then r['rememberMeOffBox'] = 255 end if not g['rememberMeOffBox'] then g['rememberMeOffBox'] = 255 end if not b['rememberMeOffBox'] then b['rememberMeOffBox'] = 255 end if not a['rememberMeOffBox'] then a['rememberMeOffBox'] = 255 end rememberMeOffBox = dxDrawRectangle(x*0.7706,y*0.3503,x*0.0272,y*0.0326,tocolor(r['rememberMeOffBox'],g['rememberMeOffBox'],b['rememberMeOffBox'],a['rememberMeOffBox']),false) range['rememberMeOffBox'] = {isMouseWithinRangeOf(x*0.7706,x*0.0272,y*0.3503,y*0.0326),'rememberMeOffBox'} rememberMeOffText = dxDrawText("Off",x*0.7706,y*0.3503,x*0.7993,y*0.3854,tocolor(0,0,0,254),1.00,"default-bold","center","center",false,false,false,false,false) if not r['rememberMeOnBox'] then r['rememberMeOnBox'] = 255 end if not g['rememberMeOnBox'] then g['rememberMeOnBox'] = 255 end if not b['rememberMeOnBox'] then b['rememberMeOnBox'] = 255 end if not a['rememberMeOnBox'] then a['rememberMeOnBox'] = 255 end rememberMeOnBox = dxDrawRectangle(x*0.7419,y*0.3503,x*0.0272,y*0.0326,tocolor(r['rememberMeOnBox'],g['rememberMeOnBox'],b['rememberMeOnBox'],a['rememberMeOnBox']),false) range['rememberMeOnBox'] = {isMouseWithinRangeOf(x*0.7419,x*0.0272,y*0.3503,y*0.0326),'rememberMeOnBox'} rememberMeOnText = dxDrawText("On",x*0.7419,y*0.3503,x*0.7706,y*0.3854,tocolor(0,0,0,254),1.00,"default-bold","center","center",false,false,false,false,false) end) links = { {loginUsernameText,loginUsernameBox,'loginUsernameBox'}, {loginPasswordText,loginPasswordBox,'loginPasswordBox'}, {loginText,loginBox,'loginBox'}, {registerUsernameText,registerUsernameBox,'registerUsernameBox'}, {registerEmailText,registerEmailBox,'registerEmailBox'}, {registerPasswordText,registerPasswordBox,'registerPasswordBox'}, {registerRetypePasswordText,registerRetypePasswordBox,'registerRetypePasswordBox'}, {registerText,registerBox,'registerBox'}, {rememberMeOffText,rememberMeOffBox,'rememberMeOffBox'}, {rememberMeOnText,rememberMeOnBox,'rememberMeOnBox'} } function getLink(text,box,generic) for i,v in pairs(links) do if v[1] == text or v[2] == box or v[3] == generic then return v[1],v[2],v[3] end end end addEventHandler('onClientRender',root,function() for i,v in pairs(range) do if v[1] == true then local text,box,generic = getLink(_,_,v[2]) if generic then r[generic] = 100 g[generic] = 100 b[generic] = 100 a[generic] = 255 end elseif v[1] == false then local text,box,generic = getLink(_,_,v[2]) if generic then r[generic] = 255 g[generic] = 255 b[generic] = 255 a[generic] = 255 end end end end)
  11. JF and I are not on good terms. The owner of JF, John Flower himself, has shared his scripts with me. John Flower and I seem to be pretty chill however, the players at that server have absolutely no respect for me. Terms were I leave them alone and they leave me alone. I suppose even now you'll hear bad things about me. /radio is FlowerSounds. /attach is FlowerAttach, and /mcreate is Offedit (Flower Remade). Those I credit towards John Flowers scripting team. I hope to have a clean server, expect more great scripts to come. I am myself working on an advanced house system, You'll be able to see updates on that since I posted a thread in the scripting forum here.
  12. I came from a place full of assholes and jerks, :Os and liars, cancer and disrespect. We all want some good gameplay. Which is why I made this server. I make at least 4 new scripts for the server every year, and they are usually quite large. Indeed these are good scripts, scripts you will probably never see in another server. I cannot afford advertising unfortunately, hence why I'm posting here. But I assure you that my server is very good, and I hope that you enjoy your time there! Website: Fencski's Freeroam Forums: Fencski's Freeroam Forums Server IP: mtasa://104.192.227.106:22158 Max Players: 60 Host Location: Chicaco, USA Email: Shay or Admin Phone: +1(920)-944-9678
  13. Groups System

    And since it is not finished, it cannot be considered a resource.
  14. Groups System

    It is a script, it contains Lua code. Therefor it belongs in the SCRIPTING topic..
  15. Groups System

    "All Lua scripting topics related to Multi Theft Auto"