-
Posts
367 -
Joined
-
Last visited
Everything posted by Benevolence
-
Anyone know how 2 fix the bug where cars blow up?UNANSWERED
Benevolence replied to ajacob112's topic in Scripting
On which script? -
What's the point?
-
Haze use [ lua]code[/lua] not [ code]code[/code]
-
Alright but imo "Thanks" sounds better than "Kudos".
-
How come I can't have other people connect to my server if I open ports but not use static IP?
-
No offense, but I dislike it. I like the default better.
-
Well it doesn' really stop useful posts. But it can help users tell if the post is useful if it has alot of thank's. Though, I see what you mean.
-
Whoever voted for GTA 1 or 2 has a problem.
-
Make sure your ISP allows you to use Static IP and those open ports.
-
Cool
-
How did they react to MTA?
-
He wants someone to explain to him how to do it.
-
My suggestion is for the forum: to add a button on every post which says "Thanks". Everytime somebody finds a post useful, they hit the "Thanks" button. Then the user under their name somewhere, it says how many "Thanks" they have gotten in total. And under every post, it says how many thanks it's gotten and it displays the names of the people who have thanked the user for the post. If you want an example, I could screenshot this feature which is used on another community forum and post it here. Hope it's possible and that you agree with my suggestion. Regards, Tank07
-
It works, thank you.
-
PLAY IT AND WRITE FEEDBACK OR PM HERE!
-
Fking PRICELESS beating the shit out of raghead osama! http://www.owensworld.com/games/fightin ... issy-fight
-
No, when I remove it, it says I need one.
-
2Dope's info below. He's been impersonating JesseUnit btw. IP Address 173.168.242.143 Host cpe-173-168-242-143.tampabay.res.rr.com Location US, United States City Land O Lakes, FL - Organization Road Runner ISP Road Runner AS Number AS33363 BRIGHT HOUSE NETWORKS, LLC Latitude 28°25'80" North Longitude 82°47'97" West Distance 9081.95 km (5643.26 miles) If you want to ban his MTA serial, which is more affective than IP ban since you can change your IP easier, then use the script below. Make a new resource folder, add these 2 scripts and the meta.xml 1st script. Note: For this first file, everytime you add a serial or ip range ban, you must add a comma off the last serial line. Look at it, you'll see what I mean. There's a comma at the end of the semi-last serial/range ip ban. Only the last line must not have a comma. -- Now he still has a personal file in our script > local bans = { "74.115.*.*", --2Dope. This is from a program he uses which changes his last digits of this IP anytime. "74.115.0.*.*" --2Dope } local serials = { "401F3B7508DD40F71FB5E35EF8538702", -- 2Dope comp 1 "14FE9A27983EB2D63C47060CE8E33C62" -- 2Dope comp 2 } addEventHandler ("onPlayerConnect", getRootElement(), function(playerNick, playerIP, playerUsername, playerSerial, playerVersion) for _, v in pairs( bans ) do if string.find( playerIP, "^" .. v .. "$" ) then cancelEvent( true, "You are banned from this server." ) end end for _, v in pairs( serials ) do outputDebugString("Challenging '".. playerSerial .. "' vs '"..v.."'") if (playerSerial == v) then outputDebugString("found ".. v) cancelEvent( true, "You are banned from this server." ) end end end ) 2nd lua file local bans = { } addEventHandler ("onPlayerConnect", getRootElement(), function(playerNick, playerIP, playerUsername, playerSerial, playerVersion) for _, v in pairs( bans ) do if string.find( playerIP, "^" .. v .. "$" ) then cancelEvent( true, "You are banned from this server." ) end end end ) meta.xml *DISCLAIMER* Credits for this script do not go to me, they go to whoever made it.
-
I don't think they'll let you test out Dedicated servers. Never seen it happen before, only seen hosts let you test Game server slots cpanel since you can't really do much on it.
-
This is retarded, it was working fine then randomly after I edited the text on chat like ggun is on, etc, it stopped working. I un-did it, etc and shiz now its giving me same thing. On line 2 'then' expected near ')' But I already added )? function toggleGGun(player) if exports.global:isPlayerAdmin(player)) then local on = not exports.gravitygun:isGravityGunEnabled(player) exports.gravitygun:togglePlayerGravityGun(player,on) outputChatBox("Gravity gun has been "..(on and "enabled." or "disabled."),player) else outputChatBox("You don't have permission to use this command.", player, 255, 194, 14) end end addCommandHandler("ggun",toggleGGun)
-
It's on-topic.
-
You also need a .dff I believe. Once you have both .txd and .dff you need a script like this addEventHandler('onClientResourceStart', resourceRoot, function() txd = engineLoadTXD ( "lambmur.txd" ) -- ***.txd: the txd file what you want use. for exampe infernus.txd engineImportTXD ( txd, 411 ) -- ***: the original vehicle id what you want replace. for example 411 dff = engineLoadDFF ( "lambmur.dff", 411 ) -- ***.dff: the dff file what you want use. for exampla infernus.dff. *** the original vehicle id what you want replace. for example 411 engineReplaceModel ( dff, 411 ) -- the original vehicle id what you want replace. for example 411 end )
-
Left4Green Race server needs more maps like these.
-
Anyone get the problem where all vehicles randomly blow up? If so, how can this be fixed. I run a Roleplay server.
-
Alright, haven't been able to test that properly Solidsnake14 but it might've fixed. I have new Warnings. gInteriorName, gOwnerName, gBuyMessage = nil timer = nil -- Message on enter function showIntName(name, ownerName, inttype, cost, fee) if (guiGetVisible(gInteriorName)) then if isTimer(timer) then killTimer(timer) timer = nil end destroyElement(gInteriorName) gInteriorName = nil destroyElement(gOwnerName) gOwnerName = nil if (gBuyMessage) then destroyElement(gBuyMessage) gBuyMessage = nil end end if name then if (inttype==3) then -- Interior name and Owner for rented gInteriorName = guiCreateLabel(0.0, 0.85, 1.0, 0.3, tostring(name), true) guiSetFont(gInteriorName, "sa-header") guiLabelSetHorizontalAlign(gInteriorName, "center", true) guiSetAlpha(gInteriorName, 0.0) gOwnerName = guiCreateLabel(0.0, 0.90, 1.0, 0.3, "Rented by: " .. tostring(ownerName), true) guiSetFont(gOwnerName, "default-bold-small") guiLabelSetHorizontalAlign(gOwnerName, "center", true) guiSetAlpha(gOwnerName, 0.0) else -- Interior name and Owner for the rest gInteriorName = guiCreateLabel(0.0, 0.85, 1.0, 0.3, tostring(name), true) guiSetFont(gInteriorName, "sa-header") guiLabelSetHorizontalAlign(gInteriorName, "center", true) guiSetAlpha(gInteriorName, 0.0) gOwnerName = guiCreateLabel(0.0, 0.90, 1.0, 0.3, "Owner: " .. tostring(ownerName), true) guiSetFont(gOwnerName, "default-bold-small") guiLabelSetHorizontalAlign(gOwnerName, "center", true) guiSetAlpha(gOwnerName, 0.0) end if (ownerName=="None") and (inttype==3) then -- Unowned type 3 (rentable) gBuyMessage = guiCreateLabel(0.0, 0.915, 1.0, 0.3, "Press F to rent for $" .. tostring(cost) .. ".", true) guiSetFont(gBuyMessage, "default-bold-small") guiLabelSetHorizontalAlign(gBuyMessage, "center", true) guiSetAlpha(gBuyMessage, 0.0) elseif (ownerName=="None") and (inttype<2) then -- Unowned any other type gBuyMessage = guiCreateLabel(0.0, 0.915, 1.0, 0.3, "Press F to buy for $" .. tostring(cost) .. ".", true) guiSetFont(gBuyMessage, "default-bold-small") guiLabelSetHorizontalAlign(gBuyMessage, "center", true) guiSetAlpha(gBuyMessage, 0.0) else local msg = "Press F to enter." if fee and fee > 0 then msg = "Entrance Fee: $" .. fee if exports.global:hasMoney( getLocalPlayer(), fee ) then msg = msg .. "\nPress F to enter." end end gBuyMessage = guiCreateLabel(0.0, 0.915, 1.0, 0.3, msg, true) guiSetFont(gBuyMessage, "default-bold-small") guiLabelSetHorizontalAlign(gBuyMessage, "center", true) guiSetAlpha(gBuyMessage, 0.0) end timer = setTimer(fadeMessage, 50, 20, true) end end function fadeMessage(fadein) local alpha = guiGetAlpha(gInteriorName) if (fadein) and (alpha) then local newalpha = alpha + 0.05 guiSetAlpha(gInteriorName, newalpha) guiSetAlpha(gOwnerName, newalpha) if (gBuyMessage) then guiSetAlpha(gBuyMessage, newalpha) end if(newalpha>=1.0) then timer = setTimer(hideIntName, 4000, 1) end elseif (alpha) then local newalpha = alpha - 0.05 guiSetAlpha(gInteriorName, newalpha) guiSetAlpha(gOwnerName, newalpha) if (gBuyMessage) then guiSetAlpha(gBuyMessage, newalpha) end if(newalpha<=0.0) then destroyElement(gInteriorName) gInteriorName = nil destroyElement(gOwnerName) gOwnerName = nil if (gBuyMessage) then destroyElement(gBuyMessage) gBuyMessage = nil end end end end function hideIntName() setTimer(fadeMessage, 50, 20, false) end addEvent("displayInteriorName", true ) addEventHandler("displayInteriorName", getRootElement(), showIntName) -- Creation of clientside blips function createBlipsFromTable(interiors) -- remove existing house blips for key, value in ipairs(getElementsByType("blip")) do local blipicon = getBlipIcon(value) if (blipicon == 31 or blipicon == 32) then destroyElement(value) end end -- spawn the new ones. for key, value in ipairs(interiors) do createBlipAtXY(interiors[key][1], interiors[key][2], interiors[key][3]) end end addEvent("createBlipsFromTable", true) addEventHandler("createBlipsFromTable", getRootElement(), createBlipsFromTable) function createBlipAtXY(inttype, x, y) if inttype == 3 then inttype = 0 end createBlip(x, y, 10, 31+inttype, 2, 255, 0, 0, 255, 0, 300) end addEvent("createBlipAtXY", true) addEventHandler("createBlipAtXY", getRootElement(), createBlipAtXY) function removeBlipAtXY(inttype, x, y) if inttype == 3 or type(inttype) ~= 'number' then inttype = 0 end for key, value in ipairs(getElementsByType("blip")) do local bx, by, bz = getElementPosition(value) local icon = getBlipIcon(value) if (icon==31+inttype and bx==x and by==y) then destroyElement(value) break end end end addEvent("removeBlipAtXY", true) addEventHandler("removeBlipAtXY", getRootElement(), removeBlipAtXY) ------ local wRightClick, ax, ay = nil local house = nil local houseID = nil local sx, sy = guiGetScreenSize( ) function showHouseMenu( ) ax = math.max( math.min( sx - 160, ax - 75 ), 10 ) ay = math.max( math.min( sx - 210, ay - 100 ), 10 ) wRightClick = guiCreateWindow(ax, ay, 150, 200, "House " .. tostring( houseID ), false) bLock = guiCreateButton(0.05, 0.13, 0.9, 0.1, "Lock/Unlock", true, wRightClick) addEventHandler("onClientGUIClick", bLock, lockUnlockHouse, false) bKnock = guiCreateButton(0.05, 0.27, 0.9, 0.1, "Knock on Door", true, wRightClick) addEventHandler("onClientGUIClick", bKnock, knockHouse, false) bCloseMenu = guiCreateButton(0.05, 0.41, 0.9, 0.1, "Close Menu", true, wRightClick) addEventHandler("onClientGUIClick", bCloseMenu, hideHouseMenu, false) end function knockHouse() triggerServerEvent("onKnocking", getLocalPlayer(), houseID) hideHouseMenu() end function lockUnlockHouse( ) local px, py, pz = getElementPosition(getLocalPlayer()) local x, y, z = getElementPosition(house) if getDistanceBetweenPoints3D(x, y, z, px, py, pz) < 5 then triggerServerEvent( "lockUnlockHouseID", getLocalPlayer( ), houseID ) end hideHouseMenu() end function hideHouseMenu( ) if wRightClick then destroyElement( wRightClick ) wRightClick = nil showCursor( false ) end house = nil houseID = nil end local function hasKey( key ) return exports.global:hasItem(getLocalPlayer(), 4, key) or exports.global:hasItem(getLocalPlayer(), 5,key) end function clickHouse(button, state, absX, absY, wx, wy, wz, e) if (button == "right") and (state=="down") and not e then if getElementData(getLocalPlayer(), "exclusiveGUI") then return end local element, id = nil, nil local px, py, pz = getElementPosition(getLocalPlayer()) local x, y, z = nil local interiorres = getResourceRootElement(getResourceFromName("interior-system")) local elevatorres = getResourceRootElement(getResourceFromName("elevator-system")) --[[ for key, value in ipairs(getElementsByType("pickup")) do if isElementStreamedIn(value) then x, y, z = getElementPosition(value) local minx, miny, minz, maxx, maxy, maxz local offset = 4 minx = x - offset miny = y - offset minz = z - offset maxx = x + offset maxy = y + offset maxz = z + offset if (wx >= minx and wx <=maxx) and (wy >= miny and wy <=maxy) and (wz >= minz and wz <=maxz) then local dbid = getElementData(value, "dbid") if hasKey(dbid) and getElementParent( getElementParent( value ) ) == interiorres then -- house found element = value id = dbid break elseif getElementData( value, "other" ) and getElementParent( getElementParent( value ) ) == elevatorres then -- it's an elevator if hasKey(getElementDimension( value ) ) then element = value id = getElementDimension( value ) break elseif hasKey(getElementDimension( getElementData( value, "other" ) ) ) then element = value id = getElementDimension( getElementData( value, "other" ) ) break