Jump to content

micheal1230

Members
  • Posts

    390
  • Joined

  • Last visited

Everything posted by micheal1230

  1. The Ip is 83.183.96.225:22003
  2. Well I Made This Info Marker Script So When You Enter The Pickup It Tells You What Message Has Been Put Into The Pickup But It Doesnt Work And I Get Bad Argument @ createPickup Line 20 When i do /createinfo Hi But When I Do /createinfo It makes the pickup but no text infopoint = createPickup(-206.5537109375, 1132.1015625, 19.7421875, 3, 1239) -- ServerSide! function info (thePlayer) outputChatBox("Welcome To Fort Carson Roleplay Server",thePlayer) cancelEvent() end addEventHandler ( "onPickupHit", infopoint, info ) function createinfo(thePlayer, commandName, info) if (exports.global:isPlayerAdmin(thePlayer)) then if not (info) then outputChatBox("SYNTAX: /" .. commandName .. " [info]", thePlayer, 255, 194, 14) local x,y,z = getElementPosition(thePlayer) local infopointpickup = createPickup(x, y, z, 3, 1239) local message = table.concat({info}, " ") else createPickup(x, y, z, 3, 1239) end end end addCommandHandler("createinfo", createinfo) function infohit(thePlayer, info) local message = table.concat({info}, " ") outputChatBox("" .. message .."",thePlayer) cancelEvent() end addEventHandler("onPickupHit", getRootElement(), infohit)
  3. Mate if you joined my server you would see its nothing like shodown i have converted the script into fort carson but there are something i dont understand like this i cant get it to work And There Are No Errors
  4. Go Troll Somewhere Else, This Is For Scripting Help And Is Nothing To Do With Them Being Released
  5. Your Just Being A Asshole Im Using Shodown Scripts Which Got Released By The Owner Medwin/Manishi Im Trying To Make My Server Better And All You Do Is Be A Asshole About It
  6. I get no Errors But It Doesnt Work local str = { } elseif (itemID==154) then -- Stretcher if (str[source]) then -- Already using the Stretcher destroyElement(str[source]) str[source] = nil exports.global:sendLocalMeAction(source, "Puts His Stretcher Away.") else exports.global:sendLocalMeAction(source, "Get Out A Stretcher.") local x, y, z = getElementPosition(source) local rot = getPedRotation(source) x = x + math.sin(math.rad(rot)) * 2.0 y = y + math.cos(math.rad(rot)) * 2.0 local object1111 = createObject(1997, x, y, z) attachElements(object1111, source, 0, 1, 0) str[source] = object1111 end
  7. I understand them just not every single bit i have converted the shodown script into a fully functioning fort carson roleplay script
  8. I understand them just not every single bit i have converted the shodown script into a fully functioning fort carson roleplay script
  9. Yes it enable developer mode so you can do commands like showsound and showcol i mainly wanted it for /showcol
  10. Unknown Setting Error function devmode() setDevelopmentMode (true) end addCommandHandler("devmode", devmode)
  11. ERROR: [gameplay]\interior-system\s_interior_system.lua:88: attempt to concatenate local 'max_items' (a nil value) Error Is Line 88 addEvent("onPlayerInteriorChange", true) local intTable = {} local safeTable = {} mysql = exports.mysql -- START OF INTERIOR SYSTEM SCRIPT -- //////////////////////////////////// -- // MYSQL // -- //////////////////////////////////// sqlUsername = exports.mysql:getMySQLUsername() sqlPassword = exports.mysql:getMySQLPassword() sqlDB = exports.mysql:getMySQLDBName() sqlHost = exports.mysql:getMySQLHost() sqlPort = exports.mysql:getMySQLPort() handler = mysql_connect(sqlHost, sqlUsername, sqlPassword, sqlDB, sqlPort) function checkMySQL() if not (mysql_ping(handler)) then handler = mysql_connect(sqlHost, sqlUsername, sqlPassword, sqlDB, sqlPort) end end setTimer(checkMySQL, 300000, 0) function closeMySQL() if (handler) then mysql_close(handler) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), closeMySQL) -- //////////////////////////////////// -- // MYSQL END // -- //////////////////////////////////// function SmallestID( ) -- finds the smallest ID in the SQL instead of auto increment local result = mysql_query(handler, "SELECT MIN(e1.id+1) AS nextID FROM interiors AS e1 LEFT JOIN interiors AS e2 ON e1.id +1 = e2.id WHERE e2.id IS NULL") if result then local id = tonumber(mysql_result(result, 1, 1)) or 1 mysql_free_result(result) return id end return false end function createInterior(thePlayer, commandName, interiorId, inttype, cost, ...) if (exports.global:isPlayerLeadAdmin(thePlayer)) then local cost = tonumber(cost) if not (interiorId) or not (inttype) or not (cost) or not (...) or ((tonumber(inttype)<0) or (tonumber(inttype)>3)) then outputChatBox("SYNTAX: /" .. commandName .. " [interior ID] [TYPE] [Cost] [Name]", thePlayer, 255, 194, 14) outputChatBox("TYPE 0: House", thePlayer, 255, 194, 14) outputChatBox("TYPE 1: Business", thePlayer, 255, 194, 14) outputChatBox("TYPE 2: Government (Unbuyable)", thePlayer, 255, 194, 14) outputChatBox("TYPE 3: Rentable", thePlayer, 255, 194, 14) elseif not exports.global:takeMoney(getTeamFromName("Government of Fort Carson"), cost) then outputChatBox("The government can't afford this property.", thePlayer, 255, 0, 0) else name = table.concat({...}, " ") local x, y, z = getElementPosition(thePlayer) local dimension = getElementDimension(thePlayer) local interiorwithin = getElementInterior(thePlayer) local inttype = tonumber(inttype) local owner = nil local locked = nil if (inttype==2) then owner = 0 locked = 0 else owner = -1 locked = 1 end interior = interiors[tonumber(interiorId)] if interior then local ix = interior[2] local iy = interior[3] local iz = interior[4] local optAngle = interior[5] local interiorw = interior[1] local max_items = interior[6] local rot = getPedRotation(thePlayer) local id = SmallestID() local query = mysql_query(handler, "INSERT INTO interiors SET id=" .. id .. ",x='" .. x .. "', y='" .. y .."', z='" .. z .."', type='" .. inttype .. "', owner='" .. owner .. "', locked='" .. locked .. "', cost='" .. cost .. "', name='" .. mysql_escape_string(handler, name) .. "', interior='" .. interiorw .. "', interiorx='" .. ix .. "', interiory='" .. iy .. "', interiorz='" .. iz .. "', dimensionwithin='" .. dimension .. "', interiorwithin='" .. interiorwithin .. "', angle='" .. optAngle .. "', angleexit='" .. rot .. "', max_items='" .. max_items .. "', fee=0") if (query) then outputChatBox("Created Interior with ID " .. id .. ".", thePlayer, 255, 194, 14) mysql_free_result(query) reloadOneInterior(id, false, false) else outputChatBox("Failed to create interior - Invalid characters used in name of the interior.", thePlayer, 255, 0, 0) end else outputChatBox("Failed to create interior - There is no such interior (" .. ( interiorID or "??" ) .. ").", thePlayer, 255, 0, 0) end end end end addCommandHandler("addinterior", createInterior, false, false)
  12. Could someone explain the position to me because i don't understand the wiki. Thanks
  13. Ok Thanks I cant get it to work -- ClientSide! addCommandHandler("stopproblem", function(player) removeEventHandler("myEvent",player) end )
  14. If you want the image to be shown to everyone with a command, then you must trigger it for every client like this. --server side addCommandHandler("problem", function(player) triggerClientEvent("myEvent",player) end ) --clientside addEvent("myEvent",true) addEventHandler("myEvent",root, function() addEventHandler("onClientRender",root,drawTheImage) end ) function drawTheImage() local screenWidth,screenHeight = guiGetScreenSize() dxDrawImage ( screenWidth/2 - 50, 50, 500, 500, 'troll.jpg', 0, -120 ) end And next time, be a bit more polite. Thanks. Thanks Mate And Sorry But How Can I Turn It Off When Activated?
  15. HELLO YOu DONT UNDERSTAND I WANT IT TO SHOW FOR THE WHOLE SERVER WHEN YOU TYPE THAT COMMAND BUT IT ONLY FLASHS AND SHOWS FOR THE PLAYER TYPING THE COMMAND
  16. Well There is no debugscript 3 error but the image only shows for about 1 seconds and it is not over the whole server just the person that types the command is shows for function troll() local screenWidth,screenHeight = guiGetScreenSize() dxDrawImage ( screenWidth/2 - 50, 50, 500, 500, 'troll.jpg', 0, -120 ) end addCommandHandler("problem",troll) function trollRender ( ) addEventHandler("onClientRender", getRootElement(), troll) -- Keep everything visible with onClientRender. end
  17. Hey You stupid stop jumping into things this is the shodown script i could just type that up that doesnt mean its from vG Nub
  18. function makemeAdmin(thePlayer, commandName, who, rank) if not (who) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Name/ID] [Rank]", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, who) if (targetPlayer) then local username = getPlayerName(thePlayer) local accountID = getElementData(targetPlayer, "gameaccountid") exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminlevel", tonumber(rank)) rank = tonumber(rank) if (rank<1337) then exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "hiddenadmin", 0) end local query = mysql:query_free("UPDATE accounts SET admin='" .. mysql:escape_string(tonumber(rank)) .. "', hiddenadmin='0' WHERE id='" .. mysql:escape_string(accountID) .. "'") outputChatBox("You set " .. targetPlayerName .. "'s Admin rank to " .. rank .. ".", thePlayer, 0, 255, 0) local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") -- Fix for scoreboard & nametags local targetAdminTitle = exports.global:getPlayerAdminTitle(targetPlayer) if (rank>0) or (rank==-999999999) then exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminduty", 1) else exports['anticheat-system']:changeProtectedElementDataEx(targetPlayer, "adminduty", 0) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(targetPlayer, "adminduty")) .. " WHERE id = " .. mysql:escape_string(getElementData(targetPlayer, "gameaccountid")) ) exports.global:updateNametagColor(targetPlayer) if (hiddenAdmin==0) then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) outputChatBox(adminTitle .. " " .. username .. " set your admin rank to " .. rank .. ".", targetPlayer, 255, 194, 14) else outputChatBox("Hidden admin set your admin rank to " .. rank .. ".", targetPlayer, 255, 194, 14) end end end end end addCommandHandler("makemeadmin", makemeAdmin, false, false)
  19. Script And Item-system Script Script function initStuff(res) if (res == getThisResource() and getResourceFromName("item-system")) or getResourceName(res) == "item-system" then for key, value in pairs(exports['item-system']:getBadges()) do badges[value[1]] = { value[4][1], value[4][2], value[4][3], value[5] } end masks = exports['item-system']:getMasks() end end addEventHandler("onClientResourceStart", getRootElement(), initStuff) Item-system Script -- -- Badges -- function getBadges( ) return { -- [itemID] = {elementData, name, factionIDs, color, iconID} [64] = { "PDbadge", "a Police Badge", {[1] = true}, {0,100,255}, 2}, [65] = { "ESbadge", "an Emergency Services ID", {[2] = "LSMS", [4] = "LSFD"}, {175,50,50}, 1}, [86] = { "SANbadge", "a SAN ID", {[20] = true}, {150,150,255}, 1}, [87] = { "GOVbadge", "a Government Badge", {[3] = true}, {50,150,50}, 1}, [82] = { "HexID", "a Hex Towing ID", {[30] = true}, {255,99,0}, 1}, [112] = { "SheriffBadge", "a State Police badge", {[87] = true}, {0,155,255}, 2}, [119] = { "UniTelID", "a UNI-TEL ID", {[125] = true}, {150,255,255}, 1}, } end -- -- Mask Data -- function getMasks( ) return { -- [itemID] = { elementData, textWhenPuttingOn, textWhentakingOff } [26] = {"gasmask", "slips a black gas mask over their face", "slips a black gas mask off their face"}, [56] = {"mask", "slips a mask over their face", "slips a mask off their face"}, [90] = {"helmet", "puts a helmet over their head", "takes a helmet off their head"}, [120] = {"scuba", "puts scuba gear on", "takes scuba gear off"}, } end
  20. What Is The Command/Code return used for?
  21. Well I Recently Brought A DeluxHost Linux Server For My MTA Server But I Cant Get The MYSQL To Work Can Someone Please Help Me
×
×
  • Create New...