RealG4

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About RealG4

  • Rank
    Newbie

Recent Profile Visitors

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

  1. RealG4

    fetchRemote Help

    Friend but are you not seeing the code? I made the attempt and it doesn't come out, if I did this script through videos
  2. RealG4

    fetchRemote Help

    please , rapair codic
  3. Help please I need the other players to see the share that I put on my vehicle ----Client GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() Panel_imagen = guiCreateWindow(0.30, 0.29, 0.37, 0.28, "fetchRemote test", true) guiWindowSetSizable(Panel_imagen, false) guiSetVisible(Panel_imagen, false) guiSetAlpha(Panel_imagen, 1.00) GUIEditor.label[1] = guiCreateLabel(0.02, 0.11, 0.96, 0.38, "¡Test", true, Panel_imagen) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", true) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") url = guiCreateEdit(0.02, 0.53, 0.96, 0.17, "", true, Panel_imagen) secUrl = guiCreateButton(0.12, 0.75, 0.36, 0.18, "enter URL.", true, Panel_imagen) guiSetFont(secUrl, "default-bold-small") guiSetProperty(secUrl, "NormalTextColour", "FFAAAAAA") cerrarPanelURL = guiCreateButton(0.52, 0.75, 0.36, 0.18, "Clouse", true, Panel_imagen) guiSetFont(cerrarPanelURL, "default-bold-small") guiSetProperty(cerrarPanelURL, "NormalTextColour", "FFAAAAAA") end ) addCommandHandler("Panel", function() guiSetVisible(Panel_imagen, not guiGetVisible(Panel_imagen)) showCursor(not isCursorShowing()) end) addEventHandler("onClientGUIClick", resourceRoot, function() if source == cerrarPanelURL then guiSetVisible(Panel_imagen, false) showCursor(false) elseif source == secUrl then texto = guiGetText(url) if texto ~= "" then if isPedInVehicle(localPlayer) then if texto:len() > 3 then -- if string.find(texto, "png") or string.find(texto, "jpg") then triggerServerEvent("change", localPlayer, texto) guiSetEnabled(secUrl, false) guiSetVisible(Panel_imagen, false) showCursor(false) outputChatBox("Loading image..", 100, 255, 0) -- else outputChatBox("The image should end at the end as PNG or JPG.", 255, 0, 0) -- end else outputChatBox("The url must have more than 3 characteristics ", 255, 0, 0) end else outputChatBox("You must be in a vehicle to load the URL", 255, 0, 0) end else outputChatBox("You must put a URL to put it to your vehicle.", 255, 0, 0) end end end ) function invalido() guiSetEnabled(secUrl, true) end addEvent("Invalido", true) addEventHandler("Invalido", root, invalido) addEvent("onClientReLoadImage", true) addEventHandler("onClientReLoadImage", root, function(image) shader_cars, tec = dxCreateShader ( "shader.fx" ) myTexture = dxCreateTexture( image ) local theScriptC = fileCreate("test.png") fileWrite(theScriptC, image) fileClose(theScriptC) engineRemoveShaderFromWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(localPlayer) ) engineApplyShaderToWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(localPlayer) ) dxSetShaderValue ( shader_cars, "TX0", myTexture ) outputChatBox("remove texture /removetexture", 0, 255, 0) ---outputChatBox("", 0, 255, 0) outputChatBox("You can only put it once in a single vehicle, unless you remove your texture to put it in another, if your vehicle disappears bad luck you will have to reconnect to put your paintjob ..", 255, 255, 255) end ) function removetexta() if isPedInVehicle(localPlayer) then if myTexture then engineRemoveShaderFromWorldTexture ( shader_cars, "vehiclegrunge256", getPedOccupiedVehicle(localPlayer) ) guiSetEnabled(secUrl, true) outputChatBox("It has been totally removed.", 255, 0, 0) end end end addCommandHandler("removetexture", removetexta) ---server addEvent("change",true) addEventHandler("change",root,function(url) fetchRemote(url,onPlayerDownloadImage,"",false,source) end) function onPlayerDownloadImage(image,err,pl) if isElement(pl) then if err == 0 then triggerClientEvent(pl,"onClientReLoadImage",root,image) local theScriptC = fileCreate(image) else outputChatBox("Invalid URL, please insert one that is.", source, 255, 0, 0) triggerClientEvent(source, "Invalido", source) triggerClientEvent(pl,"onClientReLoadImage",root,image) end end end
  4. RealG4

    Error Mask

    Help me please Why does this error give me when I remove an object? Error [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:304: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:305: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:306: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:307: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:308: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:309: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:310: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:311: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:312: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:313: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:314: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:315: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:316: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] [2019-11-26 21:41:18] WARNING: [text]\Avatars\avatars_s.Lua:317: Bad argument @ 'moveObject' [Expected element at argument 1, got nil] -----Server function removeall (thePlayer) exports.bone_attach:detachElementFromBone(mario) exports.bone_attach:detachElementFromBone(luigi) exports.bone_attach:detachElementFromBone(loro) exports.bone_attach:detachElementFromBone(Mickey) exports.bone_attach:detachElementFromBone(Cerdo) exports.bone_attach:detachElementFromBone(Anony) exports.bone_attach:detachElementFromBone(Lentes) exports.bone_attach:detachElementFromBone(Sombrero) exports.bone_attach:detachElementFromBone(Santa) exports.bone_attach:detachElementFromBone(Sombrero2) exports.bone_attach:detachElementFromBone(Lentes2) exports.bone_attach:detachElementFromBone(Cuervo) exports.bone_attach:detachElementFromBone(Mask1) exports.bone_attach:detachElementFromBone(Lentes3) exports.bone_attach:detachElementFromBone(Sombrero3) setElementData(thePlayer,"SombreroPuesto", false) setElementData(thePlayer,"LuigiPuesto", false) setElementData(thePlayer,"LoroPuesto", false) setElementData(thePlayer,"MickeyPuesta", false) setElementData(thePlayer,"CerdoPuesta", false) setElementData(thePlayer,"MascaraPuesta1", false) setElementData(thePlayer,"LentesPuestas1", false) setElementData(thePlayer,"SombreroPuesto1", false) setElementData(thePlayer,"SantaPuesto", false) setElementData(thePlayer,"SombreroPuesto2", false) setElementData(thePlayer,"SombreroPuesto3", false) setElementData(thePlayer,"LentesPuestas2", false) setElementData(thePlayer,"LentesPuestas3", false) setElementData(thePlayer,"MascaraPuestaHockey", false) setElementData(thePlayer,"CuervoPuesto", false) moveObject(mario, 1 ,0 ,0 ,0) moveObject(luigi, 1 ,0 ,0 ,0) moveObject(loro, 1 ,0 ,0 ,0) moveObject(Mickey, 1 ,0 ,0 ,0) moveObject(Cerdo, 1 ,0 ,0 ,0) moveObject(Anony, 1 ,0 ,0 ,0) moveObject(Lentes, 1 ,0 ,0 ,0) moveObject(Sombrero, 1 ,0 ,0 ,0) moveObject(Santa, 1 ,0 ,0 ,0) moveObject(Sombrero2, 1 ,0 ,0 ,0) moveObject(Lentes2, 1 ,0 ,0 ,0) moveObject(Cuervo, 1 ,0 ,0 ,0) moveObject(Mask1, 1 ,0 ,0 ,0) moveObject(Lentes3, 1 ,0 ,0 ,0) moveObject(Sombrero3, 1 ,0 ,0 ,0) end addEvent ("removeall", true) addEventHandler ("removeall", root, quitartodo)
  5. Hi friend, I need a simple help. I'm using a job as a community taxi driver Owner : Lloyd_Logan And a system of coins Owner: Neargreen And I need that when the taxi driver delivers the customer, they also give him 1 coins I will leave the 2 script 1---- job taxi ---SERVER.Lua local pickups = { [1]={ 2060.7685546875, -1941.1181640625, 13.14103603363 }, [2]={ 2114.5068359375, -1611.302734375, 13.167269706726 }, [3]={ 1932.9521484375, -1776.1259765625, 13.16081237793 }, [4]={ 1057.41796875, -1568.4853515625, 13.166387557983 }, [5]={ 1133.2607421875, -1286.6201171875, 13.245727539063 }, [6]={ 1197.380859375, -1576.9228515625, 13.2406873703 }, [7]={ 1275.6181640625, -1717.5087890625, 13.241578102112 }, [8]={ 1041.908203125, -1869.1728515625, 13.15417766571 }, [9]={ 680.9248046875, -1763.6552734375, 13.168544769287 }, [10]={ 597.5556640625, -1598.90234375, 16.215705871582 }, [11]={ 357.197265625, -1443.72265625, 34.185447692871 } } local dropoffss = { [1]={ 1965.54296875 , -1883.013671875, 13.160305023193 }, [2]={ 1467.3916015625, -1736.419921875, 13.242918014526 }, [3]={ 2376.1064453125, -1728.4091796875, 13.162055015564 }, [4]={ 1066.5029296875, -1200.86328125, 18.405519485474 }, [5]={ 584.8916015625, -1328.7021484375, 13.25985622406 }, [6]={ 989.75, -1372.083984375, 13.244333267212 }, [7]={ 1116.333984375, -1410.7666015625, 13.267498970032 }, [8]={ 1437.5244140625, -1039.8212890625, 23.564819335938 }, [9]={ 2124.4521484375, -1116.4931640625, 25.031726837158 }, [10]={ 2700.8857421875, -1091.896484375, 69.064071655273 }, [11]={ 2769.2744140625, -1494.0517578125, 27.58003616333 } } local pedCus = { [1]={ 9 }, [2]={ 10 }, [3]={ 14 }, [4]={ 15 }, [5]={ 37 } } Teame = createTeam("Taxi Driver", 0, 255, 0) taxiTeams = { [Teame] = true } taxiVehs = { [420] = true } function teamSet ( ) local team = getTeamFromName ( "Taxi Driver" ) if team then setPlayerTeam ( source, team ) setPlayerNametagColor ( source, 0, 255, 0 ) setElementModel(source, 57) createVehicle(420, 1777.3017578125, -1891.779296875, 13.157614707947) outputChatBox("You are now employed as a Taxi Driver!", thePlayer) else local teamw = getTeamFromName ( "Taxi Driver" ) if teamw then cancelEvent() outputChatBox("You are already a Taxi driver!", source) end end end addEvent ( "sTeame", true) addEventHandler ( "sTeame", root, teamSet ) function enterVehicle ( thePlayer, seat, jacked ) -- when a player enters a vehicle if getElementType ( thePlayer ) == "player" then if ( taxiVehs[getElementModel ( source )] ) and ( not taxiTeams[getPlayerTeam( thePlayer )] ) then -- if the vehicle is one of 4 police cars, and the skin is not a police skin removePedFromVehicle( thePlayer )-- force the player out of the vehicle outputChatBox("Only Taxi Drivers can drive this vehicle!", thePlayer) end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) 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 ], 58 ) addEventHandler ( "onMarkerHit", markers [ thePlayer ], warpit ) end function inVEH ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) ) then if ( getElementModel ( source ) == 420 ) 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 ) == 420 ) then setTimer ( warpPedIntoVehicle, 2000, 1, peds [ thePlayer ], vehiclee, 2 ) destroyJob ( thePlayer ) 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 destroyJob ( thePlayer ) 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 function deleteOnExit ( thePlayer ) if ( isElement ( markers [ thePlayer ] ) ) then destroyElement ( markers [ thePlayer ] ) end if ( isElement ( blips [ thePlayer ] ) ) then destroyElement ( blips [ thePlayer ] ) end if ( isElement ( peds [ thePlayer ] ) ) then destroyElement ( peds [ thePlayer ] ) end end addEventHandler ( "onVehicleExit", getRootElement(), deleteOnExit ) function destroyJob ( thePlayer ) if ( isElement ( markers [ thePlayer ] ) ) then destroyElement ( markers [ thePlayer ] ) end if ( isElement ( blips [ thePlayer ] ) ) then destroyElement( blips [ thePlayer ] ) end end function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) setElementPosition ( source, posX, posY, posZ ) end addCommandHandler ( "setpos", consoleSetPlayerPosition ) ---CLIENT.Lua GUIEditor = { memo = {}, button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.29, 0.24, 0.42, 0.49, "", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) bAccept = guiCreateMemo(0.08, 0.20, 0.41, 0.67, "", true, GUIEditor.window[1]) bAccept = guiCreateButton(0.60, 0.20, 0.34, 0.17, "Accept Job", true, GUIEditor.window[1]) guiSetFont(bAccept, "sa-header") guiSetProperty(bAccept, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", bAccept, showGUIbf, false) addEventHandler("onClientGUIClick", bAccept, joinTeam, false) bClose = guiCreateButton(0.67, 0.61, 0.20, 0.16, "CLOSE", true, GUIEditor.window[1]) guiSetProperty(bClose, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", bClose, showGUIbf, false) GUIEditor.memo[1] = guiCreateMemo(0.08, 0.20, 0.41, 0.67, "Become a Taxi Driver and get excellent wages at $500 per ride! To start simply enter a Taxi, drive to the Blue Person Icon and Pick them up. Then drop them off at the Waypoint. Easy! Perks : Repairing your Taxi at a Pay'n Spray is free!", true, GUIEditor.window[1]) end ) local joinBD = createMarker(1777.05078125, -1887.853515625, 12.387156486511, "cylinder", 0.9, 255, 0, 0) addEventHandler( "onClientResourceStart", getRootElement( ), function ( startedRes ) createBlipAttachedTo( joinBD, 60); end ); function showGUIbt(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor( true ) end end addEventHandler("onClientMarkerHit", joinBD, showGUIbt) function showGUIbf() guiSetVisible (GUIEditor.window[1], false ) showCursor ( false ) end function joinTeam() triggerServerEvent("sTeame", localPlayer, "teamSet") end ----SYSTEM COINS ---server coins --[[----------------------- *-------------------------- * COIN SYSTEM * 1.0 * * By NearGreen * * *-------------------------- ]]------------------------- addEventHandler("onResourceStart",resourceRoot, function() for _, player in ipairs(getElementsByType("player")) do setElementData(player, "moneycoins", 0) end outputDebugString("Coins System 1.1 by Neargreen | started.") end ) addEventHandler("onPlayerJoin",root, function() if get("EnableAdminCommands") == "true" then addCommandHandler("setcoin",_setPlayerCoin) addCommandHandler("givecoin",_givePlayerCoin) end setElementData(source, "moneycoins", 0) end ) addEventHandler("onPlayerJoin",root, function() setElementData(source,"moneycoins",0) end) function takePlayerCoin(thePlayer, number) if ( getElementType ( thePlayer ) == "player" ) then setElementData(thePlayer,"moneycoins",getElementData(thePlayer, "moneycoins")-tonumber(number)) end end function setPlayerCoin(thePlayer, number) if ( getElementType ( thePlayer ) == "player" ) then setElementData(thePlayer,"moneycoins",tonumber(number)) end end function givePlayerCoin(thePlayer, number) if ( getElementType ( thePlayer ) == "player" ) then setElementData(thePlayer,"moneycoins",getElementData(thePlayer, "moneycoins")+tonumber(number)) end end function getPlayerCoin(thePlayer) local data = getElementData(thePlayer, "moneycoins") thePoints = tonumber(data) return thePoints end function _setPlayerCoin(thePlayer, command, who, amount) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not tonumber ( amount ) then outputChatBox("Syntax: /setcoin <player> <amount>", thePlayer, 255, 100, 100, true) return end local receiver = getPlayerFromName(who) if not (receiver) then outputChatBox("Player not found.", thePlayer, 255, 100, 100, true) return end if not(tonumber ( amount ) <= 1) and not( tonumber ( amount ) >= 100000000 ) then setPlayerCoin (receiver, amount) outputChatBox("You've selected "..amount.." coins for "..who:gsub('#%x%x%x%x%x%x', '').."!", thePlayer, 100, 255, 100, true) else outputChatBox("You cannot transfer this amount.", thePlayer, 255, 100, 100, true) end end end function _givePlayerCoin(thePlayer, command, who, amount) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if not tonumber ( amount ) then outputChatBox("Syntax: /givecoin <player> <amount>", thePlayer, 255, 100, 100) return end local receiver = getPlayerFromName(who) if not (receiver) then outputChatBox("Player not found.", thePlayer, 255, 100, 100, true) return end if not(tonumber ( amount ) <= 1) and not( tonumber ( amount ) >= 100000000 ) then setPlayerCoin (receiver, getElementData(receiver, "moneycoins")+amount) outputChatBox("You have offered "..amount.." coins for "..who:gsub('#%x%x%x%x%x%x', '').."!", thePlayer, 100, 255, 100, true) outputChatBox("Received "..amount.." coins for "..getPlayerName(thePlayer):gsub('#%x%x%x%x%x%x', '').."!", receiver, 100, 255, 100, true) else outputChatBox("You cannot transfer this amount.", thePlayer, 255, 100, 100, true) end end end addCommandHandler("setcoin",_setPlayerCoin) addCommandHandler("givecoin",_givePlayerCoin) ---CLIENT COINS --[[----------------------- *-------------------------- * COIN SYSTEM * 1.0 * * By NearGreen * * *-------------------------- ]]------------------------- local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1024), (screenH/768) local size = y*1.50 function drawText() local playerCoins = getPlayerCoin(getLocalPlayer()); local gPlayerCoins = string.format("%08d", playerCoins); dxDrawText("¢"..gPlayerCoins, x*795, y*170, x*973, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*795, y*166, x*973, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*800, y*166, x*973, 196, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*795, y*171, x*971, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*800, y*171, x*971, 198, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*796, y*168, x*971, 196, tocolor(0, 0, 0, 255), size, "pricedown", "left", "top", false, false, false, false, false); dxDrawText("¢"..gPlayerCoins, x*797, y*169, x*972, 197, tocolor(255, 100, 100, 200), size, "pricedown", "left", "top", false, false, false, false, false); end addEventHandler("onClientRender", root, drawText) function getPlayerCoin() local data = getElementData(getLocalPlayer(), "moneycoins"); thePoints = tonumber(data); return thePoints end