Jump to content

WiBox

Members
  • Posts

    234
  • Joined

  • Last visited

Everything posted by WiBox

  1. Well thanks, i'll check if i can do as you said.
  2. i'll try it but the only problem that it's a panel, as write the ID and press PLACE, but when i use this code function spawnRoadblock, the problem is that when i place the object in colshape or outside the colshape, it not placing it's like the object isn't detecting the ColShape, because i made a small test and it was true, but i'll try to make a way so it auto refresh every time a object will be added, i appreciate your help thanks. But if there is another way to refresh the colshape automaticly when a object will be placed, because i'm new at scripting so still trying my luck.. i still got problems with addEventHandler but anyway thanks.
  3. Sorry but if you can explain more because i didn't understand or if you can send the code which i need to use, it would be great, thank you.
  4. is it hard for get fixed? it work but without: if not isElementWithinColShape (object, Z1) then destroyElement(object) end but i need to add them so if someone building inside his zone but he put one outside his specific zone so it get auto destroyed ... Please guys any help? and thanks..
  5. addEventHandler ("onPlayerLogin", root, function() KickPlayerk ( source, playerName, reason) if ( getPlayerName ( playerName ) =="the name u want to add", getPlayerSerial ( playerName ) ~= "The serial who only can use the name" ) then kickPlayer ( playerName, source, "reason of kick" ) end end) not sure but i think it should work..
  6. Hello, about what you want you can: getCameraFieldOfView getCameraTarget if one of them press on it and it will transport you to the website and it will give an example how.
  7. local Z1 = createColRectangle(1577, 1723, 60, 140 ) -- LV hospital function spawnRoadblock(id, x, y, z, rx, ry, rz, dim, int) if (not id) then return end if (id == 1225 and dim == 0) then outputChatBox("Explosive barrels can not be placed in main dimension", client, 255, 0, 0) return end if (id == 978) then z = z-1 end local accName = getAccountName(getPlayerAccount(client)) local object = createObject(tonumber(id), x, y, z, rx, ry, rz) setElementDoubleSided(object, true) setElementFrozen(object, true) setElementData(object, "creator", accName, false) roadblocks[object] = {object, getAccountName(getPlayerAccount(client))} if (tonumber(dim) ~= 0) then setElementDimension(object, dim) end if (tonumber(int) ~= 0) then setElementInterior(object, int) end if (id ~= 1225) then triggerClientEvent(client, "nobreak", client, object) end if not isElementWithinColShape (object, Z1) then destroyElement(object) end end addEvent("Zone.ZRB.AddRoadblock", true) addEventHandler("Zone.ZRB.AddRoadblock", root, spawnRoadblock) Hello, in this script as you see it's about adding a Road Block.. but i got one problem and it's i need to make that if the Object was outside a specific area so it will get auto removed, any help? I appreciate who fix this coding... Thanks.
  8. i did try it but i didn't know how to add object with it.. if you can give me a small exemple with an object not a element or player... isElementWithinColShape ( object, Z1) i tryed that didn't work
  9. local Z1 = createColRectangle(1577, 1723, 60, 140 ) function spawnRoadblock(id, x, y, z, rx, ry, rz, dim, int) if (not id) then return end if ( id =="" and dim == 0) then return true end if (id == 978) then z = z-1 end local accName = getAccountName(getPlayerAccount(client)) local object = createObject(tonumber(id), x, y, z, rx, ry, rz) setElementDoubleSided(object, true) setElementFrozen(object, true) setElementData(object, "creator", accName, false) roadblocks[object] = {object, getAccountName(getPlayerAccount(client))} if (tonumber(dim) ~= 0) then setElementDimension(object, dim) end if (tonumber(int) ~= 0) then setElementInterior(object, int) end if (id ~= 1225) then triggerClientEvent(client, "nobreak", client, object) end end addEvent("events.RB.AddRoadblock", true) addEventHandler("events.RB.AddRoadblock", root, spawnRoadblock) ____________________________________________________________________________________________________________________________ i want to add on it, if Client placed a Object outside Z1 it will not get placed, and if it placed inside the Z1 it will be placed, Please can someone help, and i appreciate that! thank you.
×
×
  • Create New...