Jump to content

Captain Cody

Members
  • Posts

    2,753
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Captain Cody

  1. https://wiki.multitheftauto.com/wiki/CreateProjectile
  2. How illegal is it on a scale from 0/10 to hack into every single on of these servers and shut their asses down for the hell of it?
  3. Man above me is correct, that's how it's done.
  4. -- Made the marker hit client side 'And just triggered server side event' and it fixed it. --
  5. Root = all scripts ResourceRoot = only that resource
  6. addEventHandler("onMarkerHit", resourceRoot, onPlayerMarkerHit) And I belive local player does work for the second one.
  7. Nothing really, just makes it easier to sort the buttons.
  8. I have raised marker, increased its size etc. Nothing works
  9. Any one, I really need to get this thing working. But it's not working. // The marker is appearing, but hitting it does nothing // //But when house is first created it works, then after entering it breaks//
  10. The markers are being created at the right locations, interiors and dimensions but the only working markers are the markers in interior 0.
  11. All of them are for sure working, checked with debug
  12. I scripted the whole code - And I did insert the data function resourceStart () executeSQLQuery("CREATE TABLE IF NOT EXISTS `HeretricsHouses` (`name` TEXT,`name1` TEXT, `eX` NUMERIC, `eY` NUMERIC, `eZ` NUMERIC, `ei` NUMERIC, `ed` NUMERIC,`exX` NUMERIC, `exY` NUMERIC, `exZ` NUMERIC, `exi` NUMERIC, `exd` NUMERIC, `garages` TEXT, `cost` NUMERIC, `Rental` TEXT, `Owner` TEXT, `Locked` TEXT )") end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) function createHouse (namea,name1a,x1a,y1a,z1a,i1a,d1a,x2a,y2a,z2a,i2a,d2a,garages1a,cost1a,rental1a) local locked = "no" executeSQLQuery("INSERT INTO `HeretricsHouses` (`name`,`name1`,`eX`,`eY`,`eZ`,`ei`,`ed`,`exX`,`exY`,`exZ`,`exi`,`exd`,`garages`,`cost`,`Rental`,`Owner`,`Locked`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",namea,name1a, tonumber(x1a),tonumber(y1a),tonumber(z1a),tonumber(i1a),tonumber(d1a),tonumber(x2a),tonumber(y2a),tonumber(z2a),tonumber(i2a),tonumber(d2a),tonumber(garages1a),tonumber(cost1a),"N/A","none",locked) createHMarker (name1a,x1a,y1a,z1a,i1a,d1a,x2a,y2a,z2a,i2a,d2a) end And I thought that what I did fixed the issue, but no it did not. Issue is still there. Exterior markers are detected but interior markers are not.
  13. Seams the markers in interiors do not work, any way to fix this? Created a house with interior and exterior in same interior and it fixed it for some reason, removing the house breaks it again but adding it fixes it..
  14. Increasing marker size does nothing.
  15. function createMarkers () local result7 = executeSQLQuery("SELECT * FROM `HeretricsHouses`") for i, v in ipairs(result7) do executeSQLQuery("UPDATE `HeretricsHouses` SET `Locked`=? WHERE `name1`=?", 'no', v.name1 ) houseMarker[v.name1] = createMarker ( v.eX,v.eY,v.eZ+0.2, "cylinder", 1.1, 0, 0, 55, 170 ) houseMarker2[v.name1] = createMarker ( v.exX,v.exY,v.exZ+0.2, "cylinder", 1.1, 0, 0, 55, 170 ) setElementData( houseMarker[v.name1],"House.Id", v.name1, true ) setElementData( houseMarker2[v.name1],"House.Id", v.name1, true ) setElementInterior ( houseMarker[v.name1], v.ei ) setElementInterior ( houseMarker2[v.name1], v.exi ) setElementDimension ( houseMarker[v.name1], v.ed ) setElementDimension ( houseMarker2[v.name1], v.exd ) setElementData ( houseMarker2[v.name1], "house.interior", true ) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), createMarkers) function housePanel (hitElement,matchingDimension, id) if getElementType ( hitElement ) == "player" then outputDebugString ("Player") if matchingDimension then outputDebugString ("matchingDem") local ElementIda = getElementData (source,"House.Id") if ElementIda then result = executeSQLQuery("SELECT * FROM `HeretricsHouses` WHERE `name1`=?", ElementIda ) resultb = result[1] else result = executeSQLQuery("SELECT * FROM `HeretricsHouses` WHERE `name1`=?", id ) resultb = result[1] end if getElementData (source,"house.interior") == false then outputDebugString ("matchingDem1") outputDebugString ("House") local resulta = resultb local name = resulta.name local Garagesaa = resulta.garages local cost = resulta.cost local Owner1 = resulta.Owner local Lockeda = resulta.Locked local x,y,z = resulta.exX, resulta.exY, resulta.exZ local interior, dem = resulta.exi, resulta.exd local account = getPlayerAccount(hitElement) local accounta = getAccountName(account) local admin = isObjectInACLGroup ("user."..accounta, aclGetGroup ( "Admin" ) ) if ElementIda then triggerClientEvent ( hitElement, "HousePanel", hitElement, ElementIda, accounta, admin, name,Garagesaa,cost,Owner1,Lockeda,x,y,z,interior, dem ) else triggerClientEvent ( hitElement, "HousePanel", hitElement, id, accounta, admin, name,Garagesaa,cost,Owner1,Lockeda,x,y,z,interior, dem ) end else outputDebugString ("matchingDem2") outputDebugString ("Interior") local account = getPlayerAccount(hitElement) if getAccountData ( account, "house.justentered") == false then setElementDimension ( hitElement, resultb.ed ) setElementInterior ( hitElement, resultb.ei ) setElementPosition ( hitElement, resultb.eX,resultb.eY,resultb.eZ+1 ) end end end end end addEventHandler( "onMarkerHit", resourceRoot, housePanel ) This creates the markers, and defines what happens when you hit the markers. Exterior markers are working just fine, but the interior markers are just ignoring any hits. Even if I remove the part about if interiormarker, doesn't even register a hit. And on start some ghost object hits the exterior marker 'nothing in sight around it' Any help would be needed, was working just fine when I first made it then it just quit on me.
  16. Well they don't teleport on script start, they will just randomly teleport after you leave the shop, This is probably what is happening, the shops at wangcars SF. I'll try freezing the cars when out of sight because that seams to be what is causing it.
  17. Well if it is extremely far away, yet still visible you can use process line of site, and just increase the distance I think
  18. Will try to explain to best of my abilities. Car shop I made allows people to enter a vehicle and buy it. -But the issue I am having, randomly some of the vehicles from the car shop just teleport in groups to the road in front of the shop, nothing I know of that is causing it.
  19. Common thing I've notice, is that randomly sections of vehicles will just teleport into the street if they are in large groups. Any way to fix this, gets a bit annoying with the type of car shop I have set up.
  20. Well the issue with this is, first there is barley any houses that will fit in every location, you would have to define the houses that go in the few hundred areas or so, and from what I see you want it automated, meaning you need to make it right direction, height, location in general, you'd have to worry about driveways and what not. Removing of the objects in the location will have to be removed correctly. Shall I continue? But other then those few 'small' issues by all means continue.
  21. Well in hedit, you go in wheels, and vehicle suspensionLowerLimit. in setModelhandling - setModelHandling(ID, "suspensionLowerLimit", 'Height you wish')
  22. vehiclegrunge256 is the texture name I checked the textures on the objects, and they either have vehiclegrunge or the jester
  23. -- Never mind the issue was else where --
  24. Forgot about that, do as n3wage has stated.
×
×
  • Create New...