Jump to content

[UCG]Mike

Members
  • Posts

    108
  • Joined

  • Last visited

Details

  • Gang
    Mark
  • Location
    Tunisia
  • Occupation
    MTA Official Scripter

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

[UCG]Mike's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

0

Reputation

  1. Hello everyone, i need some help, how to get the passwords from internal.db ?????
  2. Try with this Server --[[ /** @ name: Give-an-Item Panel (GIP) @ author: Renkon @ version: 1.0 @ type: DayZ Addon @ description: Panel which lets you give items to any player connected to your server. */ ]] addEvent("onGIPGive", true) local aclGroup -- // Minimum group in order to access give GUI. local isConfigOkay = true -- // Checking if script works correctly. -- // Adding required information in order to make the addon work correctly. -- addEventHandler("onResourceStart", resourceRoot, function() call (getResourceFromName("DayZ"), "addAddonInfo", "GIP", "Give-an-Item Panel") aclGroup = get("aclMinimumGroup") if string.find(aclGroup, ",") then aclGroup = split(aclGroup, ',') end if type(aclGroup) == "string" then if not aclGetGroup(aclGroup) then outputError("Error config meta.xml. Bad ACL Group. Resource will not work") isConfigOkay = false return end else for i, val in ipairs(aclGroup) do if not aclGetGroup(aclGroup[i]) then outputError("Error config meta.xml. Bad ACL Group. Resource will not work") isConfigOkay = false return end end end end ) -- // Handling /give command. -- addCommandHandler("give", function(pSource) end ) if not isConfigOkay then return end if type(aclGroup) == "string" then if isObjectInACLGroup ("user."..accName, aclGetGroup("Admin" )) then triggerClientEvent(pSource, "onGIPOpened", pSource) else for i, _ in ipairs(aclGroup) do if isObjectInACLGroup ("user."..accName, aclGetGroup("Admin" )) then triggerClientEvent(pSource, "onGIPOpened", pSource) break end end end end -- // Function to inform. -- function outputError(msg) outputDebugString(msg, 1) outputChatBox(msg, root, 255, 0, 0, true) end -- // Give handler. -- addEventHandler("onGIPGive", root, function(pName, item, quantity) setElementData(getPlayerFromName(pName), item, quantity) outputChatBox("Given "..quantity.." "..item.." to "..pName, source, 255, 255, 0) outputChatBox("An admin gave you "..quantity.." "..item, getPlayerFromName(pName), 255, 255, 0) end )
  3. idk but can see it https://wiki.multitheftauto.com/wiki/Useful_Functions
  4. what you mean with this picture ?
  5. no he mean Ex: when he spawn in A marker he get new car or new skin and he he spawn from B marker he get old car/skin and sry for my bad english
  6. Good Job You will upload this script in community ?
  7. give us picture of your problem
  8. [UCG]Mike

    Local Chat

    hey guys i want to edit my script to be its a local Chat chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","Local") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","Local") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(Local)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("Local",onChat)
  9. you can try with this too https://community.multitheftauto.com/ind ... ls&id=7275
  10. [UCG]Mike

    wtf....

    Hey guys idk where is the problem plz fix --\\\\\\\\\\\\\\\\\\\\\\\\\\ --// Setting local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; -- Max Distance local gTextAlpha = 120; local gTextSize = 1; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local markerp = createMarker ( 125.67847442627, 1931.6518554688, 18.23836517334, "cylinder", 2, 41, 175, 5 ); local marker1p = createMarker ( 1550.4619140625, -1634.8922119141, 12.555536270142, "cylinder", 2, 41, 175, 5 ); addEventHandler ( 'onClientRender', root, function ( ) -- local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( markerp ); local x2, y2, z2 = getElementPosition ( marker1p ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); local distance_2 = getDistanceBetweenPoints3D( x, y, z, x2, y2, z2 ); -- -- Marker #1 if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then -- local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "Military Forces", x1_, y1_, x1_, y1_, tocolor ( 17, 73, 0, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end -- Marker #2 elseif distance_2 <= gMaxDistance then local x2_, y2_ = getScreenFromWorldPosition( x2, y2, z2 + 0.95, 0.06 ); if x2_ and y2_ then -- local scale = 1 / ( gScale * ( distance_2 / gMaxDistance ) ); local alpha = ( ( distance_2 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "Military Forces", x2_, y2_, x2_, y2_, tocolor ( 17, 73, 0, textalpha ), textscale * gTextSize, "arial", "center", "bottom", false, false, false, true ); end end end ); -- ////////////////////////////////// -- // MATH FUNCTIONS // -- ////////////////////////////////// function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end Wnd = guiCreateWindow(544,193,321,470,"CNG ~ Job",false) guiWindowSetSizable( Wnd, false ) button = guiCreateButton(163,426,149,35,"No thanks!",false,Wnd) button2 = guiCreateButton(11,426,149,35,"Take job!",false,Wnd) label = guiCreateLabel(14,22,257,17,"Information about this job:",false,Wnd) memo = guiCreateMemo(9,44,322,217,"",false,Wnd) guiSetFont(label,"default-bold-small") showCursor(false) guiSetVisible( Wnd, false ) guiWindowSetSizable( Wnd, false ) guiWindowSetMovable( Wnd, true ) skins = { {"Army", 287}, } skinG = guiCreateGridList(9,288,322,133,false,Wnd) guiGridListAddColumn(skinG, "Skins", 0.85) for i,skins in ipairs(skins) do row = guiGridListAddRow(skinG) -- guiGridListSetItemText(skinG, row, 1, tostring(skins[1]), false, false) guiGridListSetItemData(skinG, row, 1, tostring(skins[2])) end function Pilotjob(hitElement) if getElementData (source, "Group") == "Military Forces" then if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob) addEventHandler("onClientMarkerHit", marker1p, Pilotjob) function takeJob() local row, col = guiGridListGetSelectedItem(skinG) if (row and col and row ~= -1 and col ~= -1) then local models = tonumber(guiGridListGetItemData(skinG, row, 1)) if model ~= "" then triggerServerEvent("Be MF", localPlayer, models) guiSetVisible(Wnd,false) showCursor(false) end end end addEventHandler("onClientGUIClick", button2, takeJob, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) afText = {} myTextItem = {} function warnText ( aWText, player ) if ( myTextItem[player] ) then textDestroyTextItem ( myTextItem[player]) end afText[player] = textCreateDisplay () textDisplayAddObserver( afText[player], player ) myTextItem[player] = textCreateTextItem ( aWText, 0.22, 0.8,0.5 , 255, 0, 0, 255, 3 ) textDisplayAddText ( afText[player], myTextItem[player] ) -- outputChatBox ( textA, player ) setTimer ( textDestroyTextItem, 5000, 1, myTextItem[player], player ) end function createPilotTeam () Pilotteam = createTeam ("Military Forces", 17, 73, 0 ) end addEventHandler ("onResourceStart", resourceRoot, createPilotTeam) function joinPilot(id) setPlayerTeam(source,Pilotteam) setPlayerNametagColor ( source, 17, 73, 0 ) setElementModel(source, id) setElementData(source, "Occupation","Military Forces", true) giveWeapon(source, 3, 1) playeraccount = getPlayerAccount( source ) setAccountData( playeraccount, "team", "Military Forces", true ) end addEvent("Be MF", true) addEventHandler("Be MF",root,joinPilot) function removePilot() setPlayerTeam(source, 0) playeraccount = getPlayerAccount(source) if not getAccountData(playeraccount, "standardskin") then setElementModel(source, 0) else setElementModel(source,getAccountData(playeraccount,"standardskin")) end end addEvent("removePilot", true) addEventHandler("removePilot",root,removePilot) markers = { } blips = { } peds = { } mposi = { } mposii = {} function startJob ( thePlayer ) local x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) markers [ thePlayer ] = createMarker ( x, y, z, "cylinder", 5.0, 255, 0, 0, 0 ) mposi = { getElementPosition( markers [ thePlayer ] ) } local skins = unpack ( pedCus [ math.random ( #pedCus ) ] ) peds [ thePlayer ] = createPed( skins, x, y, z ) blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 62 ) addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) end function inVEH ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then if ( getElementModel ( source ) == 511 ) then startJob ( thePlayer ) end end end addEventHandler ( "onVehicleEnter", getRootElement(), inVEH ) function warpit ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then local vehiclee = getPedOccupiedVehicle ( thePlayer ) if ( getElementModel ( vehiclee ) == 511 ) then local x, y, z = unpack ( dropoffss [ math.random ( #dropoffss ) ] ) markers [ thePlayer ] = createMarker ( x, y, z - 1, "cylinder", 5.0, 255, 0, 0, 50 ) mposii = { getElementPosition( markers [ thePlayer ] ) } blips [ thePlayer ] = createBlipAttachedTo ( markers [ thePlayer ], 41 ) addEventHandler ( "onMarkerHit", markers [ thePlayer ], pickmeup ) end end end function pickmeup ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then local mx, my, mz = unpack ( mposi ) local mmx, mmy, mmz = unpack ( mposii ) local money = getDistanceBetweenPoints2D ( mx, my, mmx, mmy ) finalmoney = math.floor ( money ) if finalmoney then setTimer( givePlayerMoney, 3000, 1, thePlayer, finalmoney ) setTimer( outputChatBox, 3000, 1, thePlayer, "You have earned ".. money .."!", 0, 144, 0) setTimer ( function ( ) if ( isElement ( peds [ thePlayer ] ) ) then destroyElement ( peds [ thePlayer ] ) end startJob ( thePlayer ) end ,3000, 1 ) end end end
  11. hey guys i have problem in my Staff job when any one shoot me with weapons my car blow any help plz and sry for my bad english
×
×
  • Create New...