Jump to content

Grimaexreaper

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Grimaexreaper

  1. Grimaexreaper

    MTA V?

    Not to jump off topic so much but have you tryed IV:MP alot of servers on there just use alot of /cmds instead of taking there time to create guis but its still a great thing to work with if you get or are any good at squirrel scripting but yeah id love to see GTA 5 on mta 2 tbh
  2. Fixed Problem When This Happens To Anyone Just Turn Your Draw Distance In Mta Settings Under Video To 0 or just turn it down and try to see which one it works good for you so it doest flash
  3. when you say your screen flash do you mean as a rendering problem like the trees and texutres and building flash ?
  4. i think he means it don't exist in the scripting launguage i'll be on today if u wanna finish scripting this mite as well release it when we done uncompiled
  5. function daPic2() dxUpdateScreenSource(screen); addEventHandler("onClientTrigger", picRoot, showSpeedPic2) setTimer(removeDaAnnoyingThingy, 5501, 1); end addEvent("showPicture2", true) addEventHandler("showPicture2", getLocalPlayer(), daPic2) function removeDaAnnoyingThingy2() removeEventHandler("onClientTrigger", picRoot, showSpeedPic2) end ok so now i added that client side and this server function sendWarningToCops(theVehicle, thePlayer, speed, x, y, z) if isTimer(warningTimers[thePlayer]) then toPay[thePlayer] = nil if isTimer(warningTimers[thePlayer]) then killTimer(warningTimers[thePlayer]) end local direction = "in an unknown direction" local areaName = getZoneName(x, y, z) local nx, ny, nz = getElementPosition(thePlayer) local vehicleName = getVehicleName(theVehicle) local color1, color2 = getVehicleColor(theVehicle) local dx = nx - x local dy = ny - y if dy > math.abs(dx) then direction = "northbound" elseif dy < -math.abs(dx) then direction = "southbound" elseif dx > math.abs(dy) then direction = "eastbound" elseif dx < -math.abs(dy) then direction = "westbound" end if not (vehicleName == "Police LS") then local theTeam = getTeamFromName("Los Santo's Police Department") local teamPlayers = getPlayersInTeam(theTeam) for key, value in ipairs(teamPlayers) do local duty = tonumber(getElementData(value, "duty")) if (duty>0) then outputChatBox("[RADIO] All units, Traffic violation at " .. areaName .. ".", value, 255, 194, 14) outputChatBox("[RADIO] Vehicle was a " .. vehicleColor(color1, color2) .. " " .. vehicleName .. " travelling at " .. tostring(math.ceil(speed)) .. " KPH.", value, 255, 194, 14) outputChatBox("[RADIO] Suggested Fine,10 Dollars per KM/ Over The plate is '".. getVehiclePlateText ( theVehicle ) .."' and heading " .. direction .. ".", value, 255, 194, 14) triggerClientEvent ( "showPicture2", theVehicle, thePlayer, speed, x, y, z ) end end end end end it now shows up 0 errors and works like it would before we added anything lol exatly what are we doing wrong so i can fix it?
  6. Well what he is trying to ask is for example we are rescripting the speed cam my homeboy made so heres the server side and i'll get to the point addEventHandler("onResourceStart",resourceRoot, function () for index, camera in ipairs(cameraTable) do local marker = createMarker(camera.x, camera.y, camera.z, "cylinder", camera.size, 255, 200, 0, 0, root) cameras[marker] = {speed=camera.speed} addEventHandler("onMarkerHit", marker, onCameraMarkerHit) if (enableBlips) then local blip = createBlip(camera.x, camera.y, camera.z, 0, 1, 255, 0, 0, 255, 0, 70, getRootElement()) setBlipVisibleDistance(blip, 200) end end end) function onCameraMarkerHit(hitElement) if (getElementType(hitElement) ~= "player" ) then return end if (not isPedInVehicle(hitElement)) then return end local vehicle = getPedOccupiedVehicle(hitElement) if not vehicle then return end local driver = getVehicleOccupant ( vehicle, 0 ) if (not driver) then return end if (not getVehicleSirensOn(vehicle)) then local speedx, speedy, speedz = getElementVelocity(vehicle) local cX, cY, cZ = getElementPosition(vehicle) local speed = cameras[source].speed local actualSpeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) local mph = math.floor(actualSpeed * 111.847) if (mph >= speed ) then local overSpeed = mph - speed local money = overSpeed * 10 outputChatBox("* You've got flashed! (Reason: Driving over ".. speed .." mph)", hitElement, 255, 200, 0, false) outputChatBox("* Your speed: ".. mph .."!", hitElement, 255, 200, 0, false) outputChatBox("* The Police have been Alerted of your Violation!", hitElement, 255, 200, 0, false) triggerClientEvent ( "showPicture", hitElement ) fadeCamera(hitElement, false, 0.5, 255, 255, 255) setTimer(fadeCamera, 100, 1, hitElement, true, 1.0, 255, 255, 255) warningTimers[hitElement] = setTimer(sendWarningToCops, 100, 1, vehicle, hitElement, mph, getElementPosition(hitElement)) toPay[hitElement] = money end end end ok that was the server side which my point im getting to well we are is we are trying to add it like when it pops up for example it shows up our pic on the speed cam if we speed so what we are trying to do is add it to where it also shows up for the police faction which is called Los Santo's Police Department so heres what we are getting messed up on we done this but it doest work eather way we put it first let me show u the client side so you understand function daPic() dxUpdateScreenSource(screen); addEventHandler("onClientRender", root, showSpeedPic) setTimer(removeDaAnnoyingThingy, 5500, 1); end addEvent("showPicture", true) addEventHandler("showPicture", getLocalPlayer(), daPic) ok now we go back to our server side once more and this is what we put function sendWarningToCops(theVehicle, thePlayer, speed, x, y, z) if isTimer(warningTimers[thePlayer]) then toPay[thePlayer] = nil if isTimer(warningTimers[thePlayer]) then killTimer(warningTimers[thePlayer]) end local direction = "in an unknown direction" local areaName = getZoneName(x, y, z) local nx, ny, nz = getElementPosition(thePlayer) local vehicleName = getVehicleName(theVehicle) local color1, color2 = getVehicleColor(theVehicle) local dx = nx - x local dy = ny - y if dy > math.abs(dx) then direction = "northbound" elseif dy < -math.abs(dx) then direction = "southbound" elseif dx > math.abs(dy) then direction = "eastbound" elseif dx < -math.abs(dy) then direction = "westbound" end if not (vehicleName == "Police LS") then local theTeam = getTeamFromName("Los Santo's Police Department") local teamPlayers = getPlayersInTeam(theTeam) for key, value in ipairs(teamPlayers) do local duty = tonumber(getElementData(value, "duty")) if (duty>0) then outputChatBox("[RADIO] All units, Traffic violation at " .. areaName .. ".", value, 255, 194, 14) outputChatBox("[RADIO] Vehicle was a " .. vehicleColor(color1, color2) .. " " .. vehicleName .. " travelling at " .. tostring(math.ceil(speed)) .. " KPH.", value, 255, 194, 14) outputChatBox("[RADIO] Suggested Fine,10 Dollars per KM/ Over The plate is '".. getVehiclePlateText ( theVehicle ) .."' and heading " .. direction .. ".", value, 255, 194, 14) triggerClientEvent(source, "showPicture2", theVehicle, thePlayer, speed, x, y, z) end end end end end now we go to add showPicture2 like we did on the first one in client to try and trigger the client event for example function daPic2() dxUpdateScreenSource(screen); addEventHandler("onClientRender", root, showSpeedPic) setTimer(removeDaAnnoyingThingy, 5501, 1); end addEvent("showPicture2", true) addEventHandler("showPicture2", getLocalPlayer(), daPic2) oh and one thing i forgot to show you is we also added this which is also client involving the events function showSpeedPic() rect = dxDrawRectangle(20.0,209.0,295.0,255.0,tocolor(0,0,0,140),false) dxDrawImage( 28.0,217.0,279.0,238.0, screen) end function removeDaAnnoyingThingy() removeEventHandler("onClientRender", root, showSpeedPic) end so my qustion is what is it we are not adding or what is it we are doing wrong ive tryed to add events trigger events even back door to call to server then call back to client on a diff so im stuck here any help on what we doing wrong would be apreshated --
  7. i did as you can see in the first post where it says ERROR
  8. Hmm on which line and any idea how to fix it i tryed for a long time but i coulent figure it out i just hate to have to re script a hole new shop system for clothing
  9. in debug 3 to check my code error i get this ERROR: shopfolder\c_generalshop_system.lua:342:attempt to get length of upvalue 'availableskins' (a nill value) now i will post the shop system script also my account system folder has all the pics also so i have no idea why its doing this i have never heard of a upvalue before so heres the codes wGeneralshop, iClothesPreview = nil items = nil tGShopItemTypeTab = {} gGShopItemTypeGrid = {} gcGShopItemTypeColumnName = {} gcGShopItemTypeColumnDesc = {} gcGShopItemTypeColumnPrice = {} grGShopItemTypeRow = {{ },{}} --- clothe shop skins blackMales = {7, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 28, 35, 36, 50, 51, 66, 67, 78, 79, 80, 83, 84, 102, 103, 104, 105, 106, 107, 134, 136, 142, 143, 144, 156, 163, 166, 168, 176, 180, 182, 183, 185, 220, 221, 222, 249, 253, 260, 262, 269, 270 } whiteMales = {1, 2, 23, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 58, 59, 60, 61, 62, 68, 70, 72, 73, 78, 81, 82, 94, 95, 96, 97, 98, 99, 100, 101, 108, 109, 110, 111, 112, 113, 114, 115, 116, 120, 121, 122, 124, 125, 126, 127, 128, 132, 133, 135, 137, 146, 147, 153, 154, 155, 158, 159, 160, 161, 162, 164, 165, 170, 171, 173, 174, 175, 177, 179, 181, 184, 186, 187, 188, 189, 200, 202, 204, 206, 209, 212, 213, 217, 223, 230, 234, 235, 236, 240, 241, 242, 247, 248, 250, 252, 254, 255, 258, 259, 261, 264 } asianMales = {49, 57, 58, 59, 60, 117, 118, 120, 121, 122, 123, 170, 186, 187, 203, 210, 227, 228, 229} blackFemales = {9, 10, 11, 12, 13, 40, 41, 63, 64, 69, 76, 91, 139, 148, 190, 195, 207, 215, 218, 219, 238, 243, 244, 245, 256 } whiteFemales = {12, 31, 38, 39, 40, 41, 53, 54, 55, 56, 64, 75, 77, 85, 86, 87, 88, 89, 90, 91, 92, 93, 129, 130, 131, 138, 140, 145, 150, 151, 152, 157, 172, 178, 192, 193, 194, 196, 197, 198, 199, 201, 205, 211, 214, 216, 224, 225, 226, 231, 232, 233, 237, 243, 246, 251, 257, 263 } asianFemales = {38, 53, 54, 55, 56, 88, 141, 169, 178, 224, 225, 226, 263} local fittingskins = {[0] = {[0] = blackMales, [1] = whiteMales, [2] = asianMales}, [1] = {[0] = blackFemales, [1] = whiteFemales, [2] = asianFemales}} local availableskins = {} -- these are all the skins skins = { 1, 2, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 178, 179, 180, 181, 182, 183, 184, 185, 186, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 263, 264, 269, 270, 272, 292, 295, 298, 299, 300 } function resourceStart(res) guiSetInputEnabled(false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), resourceStart) function getDiscountedPrice(price, isweapon, id) if not isweapon and id ~= 68 then if exports.global:cisPlayerPearlDonator(getLocalPlayer()) then return math.ceil( 0.5 * price ) elseif exports.global:cisPlayerSilverDonator(getLocalPlayer()) then return math.ceil( 0.75 * price ) end end return price end function showGeneralshopUI(shop_type, race, gender) if (wGeneralshop==nil) then -- Shop Tooltip if(getResourceFromName("tooltips-system"))then triggerEvent("tooltips:showHelp",getLocalPlayer(),5) end setElementData(getLocalPlayer(), "exclusiveGUI", true, false) local screenwidth, screenheight = guiGetScreenSize () local Width = 500 local Height = 350 local X = (screenwidth - Width)/2 local Y = (screenheight - Height)/2 local shopTypeName = getShopTypeName(shop_type) local ShopTabTitles = getShopTabTitles(shop_type) local imageName = getImageName(shop_type) local introMessage = getIntroMessage(shop_type) wGeneralshop = guiCreateWindow ( X , Y , Width , Height , shopTypeName, false ) lInstruction = guiCreateLabel ( 0, 20, 500, 15, "Double click on an item to buy it.", false, wGeneralshop ) guiLabelSetHorizontalAlign ( lInstruction,"center" ) lIntro = guiCreateLabel ( 0, 40, 500, 15,introMessage, false, wGeneralshop ) guiLabelSetHorizontalAlign ( lIntro,"center" ) guiBringToFront (lIntro) guiSetFont ( lIntro, "default-bold-small" ) iImage = guiCreateStaticImage ( 400, 20, 90, 80,"images/"..imageName, false,wGeneralshop ) tGShopItemType = guiCreateTabPanel ( 15, 60, 470, 240, false,wGeneralshop ) items = getItemsForSale(shop_type, race, gender) -- loop through each heading for i = 1, #ShopTabTitles do tGShopItemTypeTab[i] = guiCreateTab (ShopTabTitles[i], tGShopItemType) gGShopItemTypeGrid[i] = guiCreateGridList ( 0.02, 0.05, 0.96, 0.9, true, tGShopItemTypeTab[i]) gcGShopItemTypeColumnName[i] = guiGridListAddColumn (gGShopItemTypeGrid[i],"Name", 0.25) gcGShopItemTypeColumnPrice[i] = guiGridListAddColumn (gGShopItemTypeGrid[i] ,"Price", 0.1) gcGShopItemTypeColumnDesc[i] = guiGridListAddColumn (gGShopItemTypeGrid[i] ,"Description", 0.62) for y = 1, #items do if(items[y][6] == i) then grGShopItemTypeRow[i][y] = guiGridListAddRow (gGShopItemTypeGrid[i] ) guiGridListSetItemText ( gGShopItemTypeGrid[i] , grGShopItemTypeRow[i][y] , gcGShopItemTypeColumnName[i] ,items[y][1], false, false ) guiGridListSetItemText ( gGShopItemTypeGrid[i] , grGShopItemTypeRow[i][y] ,gcGShopItemTypeColumnPrice[i], "$"..getDiscountedPrice(items[y][3], items[y][7], items[y][4]), false, false ) guiGridListSetItemText ( gGShopItemTypeGrid[i] , grGShopItemTypeRow[i][y], gcGShopItemTypeColumnDesc[i] ,items[y][2], false, false) end end end guiSetInputEnabled(true) guiSetVisible(wGeneralshop, true) bClose = guiCreateButton(200, 315, 100, 25, "Close", false, wGeneralshop) addEventHandler("onClientGUIClick", bClose, hideGeneralshopUI) addEventHandler("onClientGUIDoubleClick", getRootElement(), getShopSelectedItem) -- if player has clicked to see a skin preview addEventHandler ( "onClientGUIClick", getRootElement(), function (button, state) if(button == "left") then if(iClothesPreview) then destroyElement(iClothesPreview ) iClothesPreview = nil end if(shop_type == 5) then if(source == gGShopItemTypeGrid[1]) then if(guiGetVisible(wGeneralshop)) then -- get the selected row local row, column = nil local row_temp, column_temp = guiGridListGetSelectedItem ( source ) if((row == nil) and (row_temp)) then row = row_temp column = column_temp local skin = tonumber(availableskins[row+1] ) if(skin<10) then skin = tostring("00"..skin) elseif(skin < 100) then skin = tostring("0"..skin) else skin = tostring(skin) end iClothesPreview = guiCreateStaticImage ( 320, 20, 100, 100, ":accounts-system/img/" .. skin..".png" , false , gGShopItemTypeGrid[1], accountRes) end end end end end end) end end addEvent("showGeneralshopUI", true ) addEventHandler("showGeneralshopUI", getRootElement(), showGeneralshopUI) function hideGeneralshopUI() if (source==bClose) then triggerServerEvent("exitShopMenu", root, localPlayer) setElementData(getLocalPlayer(), "exclusiveGUI", false, false) guiSetInputEnabled(false) showCursor(false) guiSetVisible(wGeneralshop, false) destroyElement(wGeneralshop) wGeneralshop = nil removeEventHandler ("onClientGUIDoubleClick", getRootElement(), getShopSelectedItem ) end end -- function gets the shop name, function getShopTypeName(shop_type) if(shop_type == 1) then return "General Store" elseif(shop_type == 2) then return "Gun and Ammo Store" elseif(shop_type == 3) then return "Food store" elseif(shop_type == 4) then return "Sex Shop" elseif(shop_type == 5) then return "Clothes Shop" elseif(shop_type == 6) then return "Gym" elseif(shop_type == 7) then return "Furniture Store" elseif(shop_type == then return "Electronics Store" elseif(shop_type == 9) then return "Alcohol Store" elseif(shop_type == 10) then return "Book Store" elseif(shop_type == 11) then return "Cafe" elseif(shop_type == 12) then return "Santa's Grotto" elseif(shop_type == 13) then return "Prison Worker" elseif(shop_type == 14) then return "Pizza Stack" elseif(shop_type == 15) then return "Cluckin' Bell" elseif(shop_type == 16) then return "Burger Shot" elseif(shop_type == 17) then return "Trap Spot Dealer" elseif(shop_type == 18) then return "Trap Spot Dealer #2" else return "This isn't a shop. Go Away." end end function getShopTabTitles(shop_type) if(shop_type == 1) then return {"General Items", "Consumable"} elseif(shop_type == 2) then return {"Guns"} elseif(shop_type == 3) then return {"Food","Drink"} elseif(shop_type == 4) then return {"Sexy"} elseif(shop_type == 5) then return {"Clothes"} elseif(shop_type == 6) then return {"Fighting Styles"} elseif(shop_type == 7) then return {"General NPC"} elseif(shop_type == then return {"Electronics"} elseif(shop_type == 9) then return { "Alcohol" } elseif(shop_type == 10) then return { "Books" } elseif(shop_type == 11) then return {"Food","Drink"} elseif(shop_type == 12) then return {"Presents","Free Food & Drink"} elseif(shop_type == 13) then return {"Prison Food", "Prison Drink"} elseif(shop_type == 14) then return "Pizza Stack" elseif(shop_type == 15) then return "Cluckin' Bell" elseif(shop_type == 16) then return "Burger Shot" elseif(shop_type == 17) then return {"Drugs","Guns And Ammo"} elseif(shop_type == 18) then return {"DrugZ","GunZ And Ammo"}
  10. local hostname = get( "hostname" ) or "localhost" local username = get( "username" ) or "root" local password = get( "password" ) or "" local database = get( "database" ) or "Yourdatabasenamehere" local port = tonumber( get( "port" ) ) or 3306 I use that for xamp if that helps any if your running it local just add localhost as you see in the first line and so on and where i put your databasenamehere that will be your mysql database name you created so if you called it john instead of typing Yourdatabasenamehere you would just replace it with john hope this helps a bit also make sure your s_myslq is scripted correctly and make sure your settings also are to in your deathmatch folder if you need anymore help let me know
  11. is that a fast rope or a rope climbing script
  12. YOU NEVER SAID YOUR QUESTION LIKE THAT, DON'T SAY "LEARN TO READ", first explain yourself better & use AjaxTrans (http://www.ajaxtrans.com), GOOGLE TRANSLATOR IS CRAP. So, You are still explaining yourself bad. But I think you are like trying to replace the moon with Marth planet, am I right? If so, this resources does that: https://community.multitheftauto.com/index.php?p= ... ls&id=2731 all good and thanks anyways and if u would of read a bit more you would see what i ment buddy but no thats not what i needed as the mta admin or w.e said it has no id so this post can be delted
  13. yea thanks for asking its working fine now after i got a new router and ect and re forwarded the ports it was a isp problem they was doin us dirty till we called them out on it then they came aplogized and helped us out with the router and ect as in giving a new free 1
  14. if you would learn to read what i was asking is like how vehicles have the ids and peds and weapons was the mood if so i could replace the moon with the engine script so next time read what someone is asking before talking down but thanks @ mta person and the ones who tryed to help good looks God bless
  15. thanks Eai and what u mean do i know @ benax or w.e do u kno how many mods i use with the engine function lol
  16. and i do use those seeming this is why i need the moons id in order to do so and use that lol
  17. i asked for the id not the name lol i already know what TYPE of file IT IS seeming im looking for the id so i can replace the txd with the one i made
  18. ah it started doing it again guess this wasent the fix oh well ill figure it out thanks anyways for the support from the ones who did try and help
  19. yea been runnin i was just having isp problems they where on some bs so i talked to someone thent hey hooked me up with a new router that was my problem and what i typed above
  20. does anyone have the moon id ? kinda like you know how objects have them if you replace them i can handle the scripting but i just need the moon id to make a raw moon if anyone has this let me know it would be much apreshate it il even toss the script out for the moon instead of just having to add it Manuely in to the gta img file
  21. where can i download the mta 3618 i have 1.2 but not sure on where to find this build
  22. no i was in need of one i got it for free anyways
  23. Grimaexreaper

    Skin Bug

    have you ever tryed to uninstall your mta then uninstall gta sa then re install gta and mta ? also have you tried another server to see if your having the same problem but try and re-install both of what you have completely uninstall them and re-install them but back up any files you mite wanna keep if you have anything hanging in them folders you want hope you get the problem fixed good luck
×
×
  • Create New...