Jump to content

Jimmy97

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Gang
    SABRE|RPG

Jimmy97's Achievements

Vic

Vic (3/54)

0

Reputation

  1. can u explain me why it says that : "expected to close "{" at line 4 near "["? teams = { [ "Las Venturas Police" ] = true, [ "El Quebrados Sheriff" ] = true [ "S.W.A.T" ] = true, [ "S.A.S" ] = true [ "C.I.A" ] = true, [ "Federal Bureau of Investigation" ] = true [ "Fort Carson Sheriff" ] = true [ "National Guard" ] = true [ "Fort Carson Sheriff" ] = true } if ( teams [ teamName ] ) then rbs = { } function del(source,command) for index, roadb in ipairs( rbs ) do destroyElement( roadb ) end outputChatBox("*ROADBLOCK* Deleted all roadblocks.",source,255,255,0) end addCommandHandler("rbdel",del) function small(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(978,x,y,z-0.15,0,0,rotZ) ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbsmall",small) function large(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(981,x,y,z,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rblarge",large) function yellow(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3578,x,y,z-0.2,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbyellow",yellow) function detour(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3091,x,y,z-0.38,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbdetour",detour) function cone(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1238,x,y,z-0.65,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("cone",cone) function fence(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1459,x,y,z-0.4,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("fence",fence) function line(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(2957,x,y,z-2.6,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("line",line) function dock(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3578,x,y,z-0.15,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("dbarrier",dock) function hbarrier(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(981,x,y,z-0.15,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("hbarrier",hbarrier) end
  2. thank you,man you are great
  3. can u give me example never tried that before
  4. Hey guys i downloaded RoadBlock script from mta community and edited a little bit,but now i want to lock command so just some teams can use it like : "LSPD","SFPD"(just two of those teams) here is script: rbs = { } function del(source,command) for index, roadb in ipairs( rbs ) do destroyElement( roadb ) end outputChatBox("*ROADBLOCK* Deleted all roadblocks.",source,255,255,0) end addCommandHandler("rbdel",del) function small(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(978,x,y,z-0.15,0,0,rotZ) ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbsmall",small) function large(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(981,x,y,z,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rblarge",large) function yellow(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3578,x,y,z-0.2,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbyellow",yellow) function detour(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3091,x,y,z-0.38,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("rbdetour",detour) function cone(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1238,x,y,z-0.65,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("cone",cone) function fence(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1459,x,y,z-0.4,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("fence",fence) function line(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(2957,x,y,z-2.6,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("line",line) function dock(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3578,x,y,z-0.15,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("dbarrier",dock) function hbarrier(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(981,x,y,z-0.15,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) outputChatBox("*ROADBLOCK* Added.",source,255,255,0) end addCommandHandler("hbarrier",hbarrier)
×
×
  • Create New...