Jump to content

micheal1230

Members
  • Posts

    390
  • Joined

  • Last visited

Everything posted by micheal1230

  1. Like Admins Do /fine joe_myers/playerid because i wannted to fine him /fine this is for roleplay server and i want it to come up Blah Blah Blah was fined Reason: Nitro Purchase
  2. The Title Says All How Do I Make A Fine Script For Admin With My SQL Which I Think Would Be if (exports.global:isPlayerAdmin(thePlayer)) then And It Says To All Like A Global Chat Everyone Can See Blah blah blah has fined player Reason: Nitro Installment Etc etc.
  3. Can Someone Tell Me How To Make Music Play At My Login Screen and how do i create a ped in a script, i belive Its createPed then some code
  4. Title Says All Error Phone Script Client: local sx, sy = guiGetScreenSize() pVisible = false local volume = 0.3 local currentPlaying = nil local state = nil stationsNames = {} stations = {} function isNumericKey(key) if ( key == "0" or key == "1" or key == "2" or key == "3" or key == "4" or key == "5" or key == "6" or key == "7" or key == "8" or key == "9" ) then return true else return false end end function phonePurchase() phoneWin = guiCreateWindow(0.334,0.4284,0.3467,0.1589,"Phone: Number",true) guiSetAlpha(phoneWin, 255) pnL = guiCreateLabel(0.3099,0.1721,0.3662,0.1721,"Select a phone number",true,phoneWin) local actualPhoneNumber = guiCreateEdit(0.307,0.4098,0.3746,0.1967,"",true,phoneWin) guiEditSetMaxLength(actualPhoneNumber,5) subB = guiCreateButton(0.2197,0.7787,0.2479,0.1475,"Submit",true,phoneWin) addEventHandler("onClientGUIClick", subB, function() realNumber = guiGetText(actualPhoneNumber) if (string.len(realNumber)==5) then setElementData(localPlayer, "temp.number", guiGetText(actualPhoneNumber)) triggerServerEvent("verifyNumber", root, localPlayer, getElementData(localPlayer, "temp.number")) else outputChatBox("((Your phone number must be 5 digits long))", 255,0,0) end end, false) canB = guiCreateButton(0.5183,0.7787,0.2479,0.1475,"Cancel",true,phoneWin) addEventHandler("onClientGUIClick", canB, function() destroyElement(phoneWin) end , false) end addEvent("purchasePhone", true) addEventHandler("purchasePhone", root, phonePurchase) function phoneContract() destroyElement(phoneWin) phoneContractWin = guiCreateWindow(0.334,0.4284,0.3467,0.3,"Phone: Contract",true) guiSetAlpha(phoneContractWin, 255) contractL = guiCreateLabel(0.3099,0.1721,0.3662,0.1721,"Select a phone contact",true,phoneContractWin) contractInfo = guiCreateLabel(.2,.43,.6,.4,"Select view to view contract details. The money value will be deducted from your payday.", true,phoneContractWin) guiLabelSetHorizontalAlign(contractInfo,"left",true) contractSel = guiCreateComboBox(0.25,0.3,0.5,0.5,"Select a contract",true,phoneContractWin) guiComboBoxAddItem( contractSel, "Basic Contract $10" ) guiComboBoxAddItem( contractSel, "Advanced Contract $50" ) guiComboBoxAddItem( contractSel, "Unlimited Contract $200" ) contractSub = guiCreateButton(0.18,0.8,0.3,0.1,"View",true,phoneContractWin) addEventHandler("onClientGUIClick", contractSub, function() guiSetVisible ( phoneContractWin, false ) local contractOptions = guiComboBoxGetSelected ( contractSel ) if contractOptions == 0 then bContract = guiCreateWindow(0.3936,0.444,0.2246,0.1979,"Basic Contract",true) guiSetAlpha(bContract, 255) basicL = guiCreateLabel(0.0783,0.1974,0.8609,0.5658,"-SMS \ -Calling \ \ \ \ The basics for your phone.",true,bContract) guiLabelSetHorizontalAlign(basicL,"left",true) basicBuy = guiCreateButton(0.113,0.8289,0.3522,0.1118,"Purchase",true,bContract) addEventHandler("onClientGUIClick", basicBuy, function() triggerServerEvent("registerPhone", root, localPlayer, 1, getElementData(localPlayer,"temp.number")) destroyElement(bContract) end, false) bacisGB = guiCreateButton(0.5522,0.8289,0.3522,0.1118,"Go Back",true,bContract) addEventHandler("onClientGUIClick", bacisGB, function() guiSetVisible ( phoneContractWin, true ) guiSetVisible ( bContract, false ) end, false) elseif contractOptions == 1 then aContract = guiCreateWindow(0.3936,0.444,0.2246,0.1979,"Advanced Contract",true) guiSetAlpha(aContract, 255) advL = guiCreateLabel(0.0783,0.1974,0.8609,0.5658,"-SMS \ -Calling\ -Web",true,aContract) guiLabelSetHorizontalAlign(advL,"left",true) advBuy = guiCreateButton(0.113,0.8289,0.3522,0.1118,"Purchase",true,aContract) addEventHandler("onClientGUIClick", advBuy, function() triggerServerEvent("registerPhone", root, localPlayer, 2, getElementData(localPlayer,"temp.number")) destroyElement(aContract) end, false) advGB = guiCreateButton(0.5522,0.8289,0.3522,0.1118,"Go Back",true,aContract) addEventHandler("onClientGUIClick", advGB, function() guiSetVisible ( phoneContractWin, true ) guiSetVisible ( aContract, false ) end, false) elseif contractOptions == 2 then uContract = guiCreateWindow(0.3936,0.444,0.2246,0.1979,"Unlimited Contract",true) guiSetAlpha(uContract, 255) ultL = guiCreateLabel(0.0783,0.1974,0.8609,0.5658,"-SMS \ -Calling\ -Web\ -Global Caller ID\ -GPS\ ",true,uContract) guiLabelSetHorizontalAlign(ultL,"left",true) ultBuy = guiCreateButton(0.113,0.8289,0.3522,0.1118,"Purchase",true,uContract) addEventHandler("onClientGUIClick", ultBuy, function() triggerServerEvent("registerPhone", root, localPlayer, 3, getElementData(localPlayer,"temp.number")) destroyElement(uContract) end, false) ultGB = guiCreateButton(0.5522,0.8289,0.3522,0.1118,"Go Back",true,uContract) addEventHandler("onClientGUIClick", ultGB, function() guiSetVisible ( phoneContractWin, true ) guiSetVisible ( uContract, false ) end, false) elseif contractOptions == -1 then outputChatBox("((You must select a contract to view it))", 255,0,0) end end , false) contractCan = guiCreateButton(0.5183,0.8,0.3,0.1,"Cancel",true,phoneContractWin) addEventHandler("onClientGUIClick", contractCan, function() destroyElement(phoneContractWin) end, false) end addEvent("phoneContract", true) addEventHandler("phoneContract", root, phoneContract) ---------------------------------------------------- ------------------Phone Graphic--------------------- ---------------------------------------------------- togPhone = function(itemValue) phoneVal = itemValue if getElementHealth(localPlayer) < 1 then return end if iphoneMoving then return end if pVisible then showCursor(false) addEventHandler("onClientRender", root, iphoneCloseAnim) iphoneMoving = true else showCursor(true) addEventHandler("onClientRender", root, iphoneOpenAnim) iphoneMoving = true togIcon(true) end end addEvent("showPhoneDX", true) addEventHandler("showPhoneDX", root, togPhone) local resX, resY = guiGetScreenSize() iphoneOpenAnim = function() for i = 1, 14 do local x, y = guiGetPosition(phoneMain, false) guiSetPosition(phoneMain, x, y-1, false) if y == resY - 500 then pVisible = true iphoneMoving = false removeEventHandler("onClientRender", root, iphoneOpenAnim) addEventHandler("onClientClick", root, pHome) return end end end iphoneCloseAnim = function() local x, y = guiGetPosition(phoneMain, false) guiSetPosition(phoneMain, x, y+10, false) if resY < y then pVisible = false iphoneMoving = false removeEventHandler("onClientRender", root, iphoneCloseAnim) removeEventHandler("onClientClick", root, pHome) end end function phoneFuncts ( button ) if not phoneVal then return end if button == "left" then if source == iWeather then triggerServerEvent("weatherRepo", root, localPlayer, phoneVal) elseif source == mapApp then triggerServerEvent("mapFunc", root, localPlayer, phoneVal) elseif source == iRusty then triggerServerEvent("rustyApp", root, localPlayer, phoneVal) elseif source == iScann then outputChatBox("SCANN is coming soon!", 255,0,0) elseif source == iBank then outputChatBox("Banking is coming soon!", 255,0,0) elseif source == iStocks then outputChatBox("Stocks are coming soon!", 255,0,0) else togIcon(false) if source == iEmail then outputDebugString("Winner") elseif source == iNotepad then triggerServerEvent("getNotes", root, localPlayer, phoneVal) guiSetInputEnabled ( true ) elseif source == iSettings then menuID = 2 pNumber = guiCreateLabel(0.13,0.25,0.65,0.13,"Your Phone number: "..phoneVal.."",true, phoneMain) togPowerp = guiCreateLabel(0.13,0.4,0.65,0.13,"Power On/Off:",true, phoneMain) toPowerb = guiCreateButton(0.55,0.4,0.2,0.05,"Off/On",true, phoneMain) addEventHandler("onClientGUIClick", toPowerb, function() triggerServerEvent("togglePhone", root, localPlayer, phoneVal) end,false) toContb = guiCreateButton(0.25,0.7,0.5,0.1,"Upgrade Contract",true, phoneMain) addEventHandler("onClientGUIClick", toContb, function() menuID = 1 destroyElement(pNumber) destroyElement(togPowerp) destroyElement(toPowerb) destroyElement(toContb) basPOption = guiCreateButton(0.25,0.25,0.5,0.1,"Basic Contract $10",true,phoneMain) addEventHandler("onClientGUIClick", basPOption, function() triggerServerEvent("contractUpdate", root, localPlayer, phoneVal, 1) end, false) advPOption = guiCreateButton(0.25,0.4,0.5,0.1,"Advanced Contract $50",true,phoneMain)
  5. The Title Says All Can I Portforward with tunngle cause my brothers being a bitch and no giving me the internet password
  6. Well Im Getting Spammed This Crap In Console And its Getting Annoying. Look At The Pictures, Im Getting 2 Errors Error c_nametags.lua Script: local localPlayer = getLocalPlayer() local show = true function startRes() for key, value in ipairs(getElementsByType("player")) do setPlayerNametagShowing(value, false) end end addEventHandler("onClientResourceStart", getResourceRootElement(), startRes) local playerhp = { } local lasthp = { } local playerarmor = { } local lastarmor = { } function playerQuit() if (getElementType(source)=="player") then playerhp[source] = nil lasthp[source] = nil playerarmor[source] = nil lastarmor[source] = nil end end addEventHandler("onClientElementStreamOut", getRootElement(), playerQuit) addEventHandler("onClientPlayerQuit", getRootElement(), playerQuit) function setNametagOnJoin() setPlayerNametagShowing(source, false) end addEventHandler("onClientPlayerJoin", getRootElement(), setNametagOnJoin) function streamIn() if (getElementType(source)=="player") then playerhp[source] = getElementHealth(source) lasthp[source] = playerhp[source] playerarmor[source] = getPedArmor(source) lastarmor[source] = playerarmor[source] end end addEventHandler("onClientElementStreamIn", getRootElement(), streamIn) function isPlayerMoving(player) return (not isPedInVehicle(player) and (getPedControlState(player, "forwards") or getPedControlState(player, "backwards") or getPedControlState(player, "left") or getPedControlState(player, "right") or getPedControlState(player, "accelerate") or getPedControlState(player, "brake_reverse") or getPedControlState(player, "enter_exit") or getPedControlState(player, "enter_passenger"))) end local lastrot = nil function aimsSniper() return getPedControlState(localPlayer, "aim_weapon") and getPedWeapon(localPlayer) == 34 end function aimsAt(player) return getPedTarget(localPlayer) == player and aimsSniper() end function renderNametags() if (show) then local players = { } local distances = { } local lx, ly, lz = getCameraMatrix() for key, player in ipairs(getElementsByType("player")) do if (isElement(player)) and isElementStreamedIn(player) then local logged = getElementData(player, "loggedin") if (logged == 1) then local lx, ly, lz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(player) local distance = getDistanceBetweenPoints3D(lx, ly, lz, rx, ry, rz) local limitdistance = 20 local reconx = getElementData(localPlayer, "reconx") -- smoothing playerhp[player] = getElementHealth(player) if (lasthp[player] == nil) then lasthp[player] = playerhp[player] end playerarmor[player] = getPedArmor(player) if (lastarmor[player] == nil) then lastarmor[player] = playerarmor[player] end if (player~=localPlayer) and (isElementOnScreen(player)) and (aimsAt(player) or distanceor reconx) then if not getElementData(player, "reconx") and not getElementData(player, "freecam:state") then --local lx, ly, lz = getPedBonePosition(localPlayer, 7) local lx, ly, lz = getCameraMatrix() local vehicle = getPedOccupiedVehicle(player) local collision, cx, cy, cz, element = processLineOfSight(lx, ly, lz, rx, ry, rz+1, true, true, true, true, false, false, true, false, vehicle) if not (collision) or aimsSniper() or (reconx) then local x, y, z = getElementPosition(player) if not (isPedDucked(player)) then z = z + 1 else z = z + 0.5 end local sx, sy = getScreenFromWorldPosition(x, y, z+0.45, 100, false) local oldsy = nil -- HP if (sx) and (sy) then local health = math.ceil(lasthp[player]) if ( math.ceil(playerhp[player]) < health ) then health = health - 1 lasthp[player] = health elseif ( math.ceil(playerhp[player]) > health ) then health = health + 1 lasthp[player] = health end if (health>0) then distance = distance / 5 if (reconx or aimsAt(player)) then distance = 1 elseif (distance<1) then distance = 1 elseif (distance>2) then distance = 2 end local offset = 45 / distance -- DRAW BG dxDrawRectangle(sx-offset-5, sy, 95 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) oldsy = sy -- DRAW HEALTH local width = 85 local hpsize = (width / 100) * health local barsize = (width / 100) * (100-health) local color if (health>70) then color = tocolor(0, 255, 0, 130) elseif (health>35 and health<=70) then color = tocolor(255, 255, 0, 130) else color = tocolor(255, 0, 0, 130) end if (distance<1.2) then dxDrawRectangle(sx-offset, sy+5, hpsize/distance, 10 / distance, color, false) dxDrawRectangle((sx-offset)+(hpsize/distance), sy+5, barsize/distance, 10 / distance, tocolor(162, 162, 162, 100), false) else dxDrawRectangle(sx-offset, sy+5, hpsize/distance-5, 10 / distance-3, color, false) dxDrawRectangle((sx-offset)+(hpsize/distance-5), sy+5, barsize/distance-2, 10 / distance-3, tocolor(162, 162, 162, 100), false) end end end -- ARMOR --sx, sy2 = getScreenFromWorldPosition(x, y, z+0.25, 100, false) if (sx) and (sy) then if (distance<=2) then sy = math.ceil( sy + ( 2 - distance ) * 20 ) end sy = sy + 10 if (sx) and (sy) then local armor = math.ceil(lastarmor[player]) if ( math.ceil(playerarmor[player]) < armor ) then armor = armor - 1 lastarmor[player] = armor elseif ( math.ceil(playerhp[player]) > armor ) then armor = armor + 1 lastarmor[player] = armor end if (armor>5) then local offset = 45 / distance -- DRAW BG dxDrawRectangle(sx-offset-5, sy, 95 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) -- DRAW HEALTH local width = 85 local armorsize = (width / 100) * armor local barsize = (width / 100) * (100-armor) if (distance<1.2) then dxDrawRectangle(sx-offset, sy+5, armorsize/distance, 10 / distance, tocolor(197, 197, 197, 130), false) dxDrawRectangle((sx-offset)+(armorsize/distance), sy+5, barsize/distance, 10 / distance, tocolor(162, 162, 162, 100), false) else dxDrawRectangle(sx-offset, sy+5, armorsize/distance-5, 10 / distance-3, tocolor(197, 197, 197, 130), false) dxDrawRectangle((sx-offset)+(armorsize/distance-5), sy+5, barsize/distance-2, 10 / distance-3, tocolor(162, 162, 162, 100), false) end end end -- NAME --sx, sy = getScreenFromWorldPosition(x, y, z+0.6, 100, false) --sy = sy - (60 - distance*10) if (distance<=2) then sy = math.ceil( sy - ( 2 - distance ) * 40 ) end sy = sy - 20 if (sx) and (sy) then if (distance < 1) then distance = 1 end if (distance > 2) then distance = 2 end local offset = 75 / distance local scale = 0.6 / distance local font = "bankgothic" local r, g, b = getPlayerNametagColor(player) dxDrawText(getPlayerNametagText(player), sx-offset+2, sy+2, (sx-offset)+130 / distance, sy+20 / distance, tocolor(0, 0, 0, 220), scale, font, "center", "middle", false, false, false) dxDrawText(getPlayerNametagText(player), sx-offset, sy, (sx-offset)+130 / distance, sy+20 / distance, tocolor(r, g, b, 220), scale, font, "center", "middle", false, false, false) -- DRAW ids local offset = 65 / distance local id = getElementData(player, "playerid") if (oldsy) and (id) then if (id<100 and id>9) then -- 2 digits dxDrawRectangle(sx-offset-15, oldsy, 30 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-22.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) elseif (id<=9) then -- 1 digit dxDrawRectangle(sx-offset-5, oldsy, 20 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-12.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) elseif (id>=100) then -- 3 digits dxDrawRectangle(sx-offset-25, oldsy, 40 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-32.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) end end end end end end end end end end end end addEventHandler("onClientRender", getRootElement(), renderNametags) function hideNametags() show = false
  7. kay its in Admin script -- /GIVEITEM function givePlayerItem(thePlayer, commandName, targetPlayer, itemID, ...) if (exports.global:isPlayerAdmin(thePlayer)) then if not (itemID) or not (...) or not (targetPlayer) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Nick / ID] [item ID] [item Value]", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer) if targetPlayer then local logged = getElementData(targetPlayer, "loggedin") itemID = tonumber(itemID) local itemValue = table.concat({...}, " ") itemValue = tonumber(itemValue) or itemValue if ( itemID == 74 or itemID == 75 or itemID == 78 ) and not exports.global:isPlayerScripter( thePlayer ) and not exports.global:isPlayerHeadAdmin( thePlayer) then -- nuthin elseif ( itemID == 84 ) and not exports.global:isPlayerLeadAdmin( thePlayer ) then elseif (logged==0) then outputChatBox("Player is not logged in.", thePlayer, 255, 0, 0) elseif (logged==1) then local name = call( getResourceFromName( "item-system" ), "getItemName", itemID ) if itemID > 0 and name and name ~= "?" then local success, reason = exports.global:giveItem(targetPlayer, itemID, itemValue) if success then exports.global:sendMessageToAdmins("AdmCmd: " .. getPlayerName(thePlayer) .. " gave " .. targetPlayerName .. " a " .. name .. " with value " .. itemValue .. ".") outputChatBox("Player " .. targetPlayerName .. " now has a " .. name .. " with value " .. itemValue .. ".", thePlayer, 0, 255, 0) exports.logs:logMessage(getPlayerName(thePlayer):gsub("_", " ") .. " gave " .. targetPlayerName .. " a " .. name .. " with value " .. itemValue, 13) if itemID == 2 or itemID == 17 then triggerClientEvent(targetPlayer, "updateHudClock", targetPlayer) end else outputChatBox("Couldn't give " .. targetPlayerName .. " a " .. name .. ": " .. tostring(reason), thePlayer, 255, 0, 0) end else outputChatBox("Invalid Item ID.", thePlayer, 255, 0, 0) end end end end end end addCommandHandler("giveitem", givePlayerItem, false, false)
  8. micheal1230

    VPS

    lol you buy VPS ANd Not Know How To Install MTA Server
  9. Well The Title Says All Here Are Some IG Pics And A Pic On The Script IG Error In Debug Script 3 Script
  10. I USed The InteriorWarpSource For Entry And WarpReturn For Exit But It Doesnt Work
  11. I Put These 2 teleport markers and parented them but the dont work still
  12. where is teleport editor in map editor
  13. Well I Have Got The Default Interior Resource Made By MTA And Wiped The Interior.map And Put My Own In And The Marker Doesnt Work either Does The Enter Interior.map "Cjhouse" posX="2495.2521972656" posY="-1690.9348144531" posZ="14.765625" rotation="0" dimension="0" interior="0" /> "Cjhouse" posX="2495.8999023438" posY="-1692.5999755859" posZ="1014.4000244141" rotation="0" interior="3" dimension="10" /> Please Help
  14. Is There A Resource That Lets Admins Create Interiors For All People To Enter, Like Normal GTA Ints
  15. Yes I Have Noticed You Helped Create It Can You Tell Me How To Fix This Bug???
  16. Can someone give me a step by step guide on how to make your own marker to enter a interior in a custom place with the normal int system. What I mean is like make a interior anywhere like add a interior to the place I mapped
  17. Well I Use The Zombie Gamemode Resource But It Doesnt Save Your Skills Or Your Weapons Any ideas on How To Fix This https://community.multitheftauto.com/index.php?p=resources&s=details&id=2405
  18. Can I Create A Mission In DYOM And Transfer It Into A Script Type Thing That Will Run On My Server??
  19. Me and my mate want to have some gates at grove street because ours is revolution zombies and we don't know how to script a moving gate
  20. How do I make a npc spawn and when u click on him/her a GUI comes up that u can buy from
  21. Can Someone Give Me A Script That Lets You Have NPCs That Open Up Shop GUIs And You Can Buy Stuff
  22. i do that but the normal players can still do it
×
×
  • Create New...