Alan.Alexander
Members-
Posts
55 -
Joined
-
Last visited
Everything posted by Alan.Alexander
-
So IF I want remote access, then MySQL is the way forward? But if I DON'T want remote access...? And if I want to make a forum for my server, can I just verify a players login details through the internal.db and link it to a forum account?
-
Care to elaborate in which ways exactly that MySQL is "more functional and convenient"?
-
You are aware that with a limited view of what you're working with, we can only offer limited help, right?
-
I would assume that in your client script, your GUI button "close" isn't being created properly giving a nil result.
-
I got bored and made myself a login panel for MySQL, I now don't know what to do with it exactly. I keep thinking "Maybe MTA functions are quicker and easier to use..." and such thoughts. So I'm here to ask a question: Should I go fully down the path of MySQL, should I stick MTA's SQLite databases, functions and events, or should I try to find a happy medium?
-
https://community.multitheftauto.com/index.php?p= ... ls&id=7476 Blatant copy of my fuel resource titled "fuel", didn't even change the meta.xml. Might wanna take a look at all of his resource uploads though, at least one is a skin upload. DONE
-
I need armor regeneration when standing script, please :)
Alan.Alexander replied to Yazir's topic in Scripting
function regenArmor() for _,player in ipairs(getElementsByType("player")) do local arm = getPedArmor(player); if arm < 100 then local nuarm = arm + 10; if nuarm > 100 then nuarm = 100; end setPedArmor(player,nuarm) end end end setTimer(regenArmor,5000,0); There you go, now fuck off and learn properly so you don't have to waste our time and your own time in future. Edit: Please bare in mind that this is a server script. -
First script is a player save script, second is a respawn, enjoy.
-
If your main concern is to earn moneey from a platform which you can develop your own servers or free, can I suggest you simply look elsewhere? Take joy in the scripting of the server itself and look at any "earnings" as a bonus, don't focus on them from the start.
-
I found http://www.byserv.de/gameserver/mta/?ut ... TA-Banner# on the MTA Heroes page, or something, maybe the hosting page... Anyways, a lot of MTA hosters won't offer SMS payments because of the high costs in running that shiz. However, the company I linked you too off something else where you can buy a voucher in cash from a paypoint of sorts and use the code from taht to pay for it. I've forgotten the details since I last checked, so you could always check that out?
-
What kind of price range are you talking here? And what kind of access to the server would you need? A control panel, FTP?
-
Heh, I just noticed that the filter changed my function names... Awesome...
-
You can PM me if you want, I also have a friend who hosts servers and does scripting as well.
-
Here's a wee gate script I've made, just thought I would post it here (instead of the community since this isn't really a resource) in case it helps anyone. local gatePos = {}; local gate = {}; --gatePos[0] = {ox,oy,oz,orotx,oroty,orotz,cx,cy,cz,crotx,croty,crotz,model,dur} gatePos[1] = {2002.8,-1451,15.3,0,0,180,nil,nil,'-5.4',nil,nil,nil,980,1000}; gatePos[2] = {1997,-1445.2,15.3,0,0,90,nil,nil,'-5.4',nil,nil,nil,980,1000}; gatePos[3] = {-2740.5,569.7,15.15,0,0,90,'-3.95','3.95',nil,nil,nil,-90,985,1000}; gatePos[4] = {-2740.5,561.8,15.15,0,0,90,'-3.95','-3.95',nil,nil,nil,90,986,1000}; local colShapes = {} --colShapes[0] = {x,y,z,sizeX,sizeY,sizeZ,{gate,ids}}; colShapes[1] = {1991,-1458,12,18,19,6,{1,2}}; colShapes[2] = {-2747,557.5,13,15,16,8,{3,4}}; addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() for i,v in ipairs(gatePos) do gate[i] = createObject(v[13],v[1],v[2],v[3],v[4],v[5],v[6]); setElementData(gate[i],'posData',v); setElementInterior(gate[i],0); setElementDimension(gate[i],0); end gatePos = nil; for i,v in ipairs(colShapes) do local colShape = createColCuboid(v[1],v[2],v[3],v[4],v[5],v[6]); addEventHandler("onColShapeHit",colShape,function(p,d); if getElementType(p) == 'player' and d then openTheFuckingGates(v[7],source); end end); addEventHandler("onColShapeLeave",colShape,function(p,d) if getElementType(p) == 'player' and d then closeTheFuckingGates(v[7],source); end end); end end); function openTheFuckingGates(whatGates,col) for k,v in ipairs(whatGates) do local posData = getElementData(gate[v],'posData'); local x = {}; for data=1,3 do local y =data+6; x[data] = posData[data]; if type(posData[y]) == 'number' then x[data] = posData[y] elseif type(posData[y]) == 'string' then x[data] = x[data] + tonumber(posData[y]) end end for data=4,6 do x[data] = posData[data+6] or 0; end moveObject(gate[v],posData[14],x[1],x[2],x[3],x[4],x[5],x[6]); end end function closeTheFuckingGates(whatGates,col) local eles = getElementsWithinColShape(col,'player'); if #eles then return false; end for k,v in ipairs(whatGates) do local posData = getElementData(gate[v],'posData'); local x = {}; for data=1,3 do local y =data+6; x[data] = posData[data]; end for data=4,6 do if posData[data+6] then x[data] = posData[data+6]-posData[data+6]-posData[data+6]; else x[data] = 0; end end moveObject(gate[v],posData[14],x[1],x[2],x[3],x[4],x[5],x[6]); end end It should be pretty straightforward to understand, you create a colShape by defining a new row in colShapes[], and you can make it more one or more gates. For the gates themselves, you set the open values, and the closed values. For the closed values you can let them as a number for it to just move to that co-ord, or have them as a string like they are there for the example X and Ys in the script, and it will move the gates that much, instead of needing to calculate shit. I'm not sure how well the rotations work on that whole string based thing. And I'm not saying that it's perfect or bugless, it's just here in case anyone can find it useful.
-
Slotman, maybe it might help if you actually learn how to script first... Or even take more English lessons BEFORE asking?
-
Here's a wee mod in case anyone's interested. unallowedMatTypes = {}; for i=1,17 do unallowedMatTypes[i] = true; end for i=19,34 do unallowedMatTypes[i] = true; end for i=74,82 do unallowedMatTypes[i] = true; end for i=85,89 do unallowedMatTypes[i] = true; end for i=115,125 do unallowedMatTypes[i] = true; end unallowedMatTypes[144] = true; for i=146,153 do unallowedMatTypes[i] = true; end for i=160,165 do unallowedMatTypes[i] = true; end addEvent( "Spawn_Placement", true ) function Spawn_Place(xcoord, ycoord) local x,y,z = getElementPosition( getLocalPlayer() ) local posx = x+xcoord local posy = y+ycoord local gz = getGroundPosition ( posx, posy, z+500 ) local hit, mx, my, mz, elementHit, nx, ny, nz, mat = processLineOfSight(posx, posy, z+500, posx, posy, z-500) if mat == nil or unallowedMatTypes[mat] ~= true then return; elseif (z-gz) > 20 then return; else triggerServerEvent ("onZombieSpawn", getLocalPlayer(), posx, posy, gz+1 ) end end addEventHandler("Spawn_Placement", getRootElement(), Spawn_Place) As far as I've tested it, it seems to work. Its job is to stop zombies spawning on roofs and shiz, along with under water. Long(ish) version of my idea: Why not introduce some sort of animals as well? Kinda like this script, but animals and shiz. YOu can kill them and pick up their dead carcass and then leave it as zombie bait? Short version: Zombie bait, they get more attracted to that shit than players if they come within a small colShape of the bait?
-
Get some what?
-
I don't think they're using HTML. I think they just grab some RSS feeds and format them into a GUI.
-
Today I was at the opticians getting an eye test. The optician was a hot blonde Irish lass. When she was checking the back of my eyes with that wee light thing, she was right up in my face and I could feel her breath on my cheek. I was SOOOO fucking tempting to just turn around and kiss her. ... I really want to fuck her...
-
I think I'ma just use SQLite 'cause fuck MySQL since it's being a bitch. Cheers for the help though guys.
-
I used example 1.2, I'm getting this... lo: 127.0.0.1 venet0: 127.0.0.2 venet0: addr
-
I've tried using 127.0.0.1, 127.0.0.2 (both were listed in ifconfig) and my external IP address... Nothing's working.
-
I'm not sure you read my first post, but I'm running this on a Debian 6 server? ipconfig doesn't work like that and I'm a bit of a noob with Linux...
-
That's why I was using 127.0.0.1 in the first place.
-
I'm having a wee bit of trouble with using MySQL in MTA . While on my local, I can run XAMPP and connect to the MySQL easily, but on my Debian 6 server with XAMPP using tyhe exact same tables and script it doesn't seem to want to connect. Anyone have any idea what the problem might be?
