Jump to content

Hassam

Members
  • Posts

    53
  • Joined

  • Last visited

Everything posted by Hassam

  1. Well, I put all screenshot for the example.
  2. Hello, I'm selling one system of base/gates for 15€, it's a nice system and easy to put the gates and creating the objects. If you want this system, send me one pm and I will send you my skype to talk. Thanks for read, best regards Hassam Link of download "GateSystem"(had one password, I will give you if you buy my script). (Removed the link due can be abused by hackers) Edit:If I'm not the correct board, move this topic. SS http://imgur.com/lmhFPH0 http://imgur.com/vKQTCmQ
  3. Hello fellow guys, I'm posting here due I need help, when I use "/swatadd name", I can't put one guy on team swat. addCommandHandler("swatadd", function(player, command, plr) local name = getPlayerFromName (plr) if (name) then local accname = getAccountName ( getPlayerAccount ( player) ) if ( isObjectInACLGroup ( "user.".. accname, aclGetGroup ( ( "GolawSwat" ) ) ) ) then setPlayerTeam(plr, SWAT) setPlayerNametagColor (plr, 65, 105, 225) setElementModel(plr, 285) setElementData(plr, "Occupation", "SWAT Team", true ) outputChatBox(plr.." is now SWAT Team.",source,0,255,0) else outputChatBox("You aren't allowed use this command.",source,0,255,0) end end end )
  4. Hello, I'm posting here, because, I try spawn some cars with my friend, and I spawned one car, and my friend spawn another and my car is destroyed. I need help to fix for I and my friend can use one vehicle and when I change to another car, the first car will be destroy. addEvent ( "SwatSpawn_Ambulance", true ) addEventHandler ( "SwatSpawn_Ambulance", root, function () if ( isElement ( Ambulance) ) then destroyElement ( Ambulance ) elseif ( isElement ( Bullet) ) then destroyElement ( Bullet ) elseif ( isElement ( Enforcer) ) then destroyElement ( Enforcer ) end x,y,z = getElementPosition(source) Ambulance = createVehicle ( 416,x+3,y,z, 0, 0, 270) if ( Ambulance ) then setVehicleColor ( Ambulance, 0, 0, 65, 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source,Ambulance ) triggerClientEvent (source,"closeWindowCars", root ) end ) addEvent ( "SwatSpawn_Enforcer", true ) addEventHandler ( "SwatSpawn_Enforcer", root, function () if ( isElement ( Ambulance) ) then destroyElement ( Ambulance ) elseif ( isElement ( Bullet) ) then destroyElement ( Bullet ) elseif ( isElement ( Enforcer) ) then destroyElement ( Enforcer ) end x,y,z = getElementPosition(source) Enforcer = createVehicle ( 427,x+3,y,z, 0, 0, 270) setTimer ( warpPedIntoVehicle, 200, 1, source,Enforcer ) triggerClientEvent (source,"closeWindowCars", root) if ( Enforcer ) then setVehicleColor ( Enforcer, 0, 0, 65, 255, 255, 255 ) end end ) addEvent ( "SwatSpawn_Bullet", true ) addEventHandler ( "SwatSpawn_Bullet", root, function () if ( isElement ( Ambulance) ) then destroyElement ( Ambulance ) elseif ( isElement ( Bullet) ) then destroyElement ( Bullet ) elseif ( isElement ( Enforcer) ) then destroyElement ( Enforcer ) end x,y,z = getElementPosition(source) Bullet = createVehicle ( 541,x+3,y,z, 0, 0, 270) setTimer ( warpPedIntoVehicle, 200, 1, source,Bullet ) triggerClientEvent (source,"closeWindowCars", root) if ( Bullet ) then setVehicleColor ( Bullet, 0, 0, 65, 255, 255, 255 ) end end )
  5. Worked, Thanks a lot
  6. didn't worked, look at this gui: SwatCars = {416, 427, 490, 528, 523, 470, 598, 596, 597, 599, 601, 428, 541, 579, 560, 451, 495, 426, 551} function swatcars1() for v = 400, 611 do if ( getVehicleNameFromModel ( v ) ~= "" ) then table.insert( SwatCars, { model = v, name = getVehicleNameFromModel ( v ) } ) end end table.sort( SwatCars, function(a, b) return a.name < b.name end ) for index, swatcar in ipairs(SwatCars) do local row = guiGridListAddRow (carGridswat) guiGridListSetItemText ( carGridswat, row, nameColswat, swatcar.name, false, false ) end end addEventHandler("onClientResourceStart", resourceRoot, swatcars1) Gui carWinSwat = guiCreateWindow(rx / 2 - 150, ry / 2 - 167, 300, 337, "Select a vehicle to use", false) guiSetAlpha(carWinSwat, 0.95) guiSetVisible(carWinSwat, false) carGridswat = guiCreateGridList(11, 31, 285, 237, false, carWinSwat) guiGridListSetSelectionMode(carGridswat, 1) nameColswatcar = guiGridListAddColumn(carGridswat, "Vehicle Name", 0.-- s8) --> useBut_swat = guiCreateButton(20, 282, 108, 38, "Use Vehicle", false, carWinSwat) closeBut_swat = guiCreateButton(170, 282, 108, 38, "Cancel", false, carWinSwat)
  7. Didn't worked Edited, now worked something, but now I can't see the cars SwatCars = {416, 427, 490, 528, 523, 470, 598, 596, 597, 599, 601, 428, 541, 579, 560, 451, 495, 426, 551} function swatcars1() for v = 400, 611 do if ( getVehicleNameFromModel ( v ) ~= "" ) then table.insert( SwatCars, { model = v, name = getVehicleNameFromModel ( v ) } ) end end table.sort( SwatCars, function(a, b) return a.name < b.name end ) end another correction for index, swatcar in ipairs(SwatCars) do local row1 = guiGridListAddRow (carGridswat) guiGridListSetItemText ( carGridswat, row1, nameColswat, tostring(swatcar), false, false ) end
  8. Hello scripters, I'm creating this topic due, I had a some difficult about this: SwatCars = {416, 427, 490, 528, 523, 470, 598, 596, 597, 599, 601, 428, 541, 579, 560, 451, 495, 426, 551} function swatcars() for v = 400, 611 do if ( getVehicleNameFromModel ( v ) ~= "" ) then table.insert( SwatCars, { model = v, name = getVehicleNameFromModel ( v ) } ) end end table.sort( SwatCars, function(a, b) return a.name < b.name end ) end I can't put the names of cars from model, someone can help me? Thanks Edit: for index, swatcar in ipairs(SwatCars) do local row = guiGridListAddRow (CarGridswat) guiGridListSetItemText ( carGridswat, row, nameColswat, tostring(swatcar), false, false ) end
  9. Hello guys, I need help from this script, I want put 2 markers, and when I enter on first marker, I want spawn some car, and when I want enter another marker, the car will go to first position, can help me? addEvent ( "spawnVehicle", true ) addEventHandler ( "spawnVehicle", root, function ( vehID) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end if isElementWithinMarker(thePlayer, marker1) then vehicles [ source ] = createVehicle ( vehID, 2001.04370, -1407.97461, 16.91025, 0, 0, 180) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 6, 183, 248 ) end setTimer ( warpPedIntoVehicle, 100, 1, source, vehicles [ source ] ) triggerClientEvent ( source, "closeWindow", root ) elseif (isElementWithinMarker(thePlayer, marker2))then vehicles [ source ] = createVehicle ( vehID, 1180.0832519531, -1338.3778076172, 13.409983634949, 0, 0, 270) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 6, 183, 248 ) end setTimer ( warpPedIntoVehicle, 100, 1, source, vehicles [ source ] ) triggerClientEvent ( source, "closeWindow", root ) end end )
  10. usage this resource. bool scoreboardRemoveColumn ( string name, [ element forElement = getRootElement() ] ) From mtasawiki
  11. Tenta fazer isso: function pQuit ( ) local team = getElementData(localPlayer, "Ocupação") if ( team ) then setAccountData ( source, "Ocupação1", team ) end end addEventHandler ( "onPlayerQuit", root, pQuit ) function onPlayerLogin ( _, acc ) local teamName = getAccountData ( acc, "Ocupação1" ) if ( teamName and #teamName ~= 0) then local team = getElementData (source, "Ocupação") if ( team ) then setElementData ( source, team ) end end end addEventHandler ( "onPlayerLogin", root, onPlayerLogin ) Antes disso, faz assim, setElementData e setPlayerTeam, ou senão nao vai funcionar
  12. root = getRootElement () local resource = getResourceMapRootElement ( resource, "SWATgates" ) function openSWATGate1(thePlayer) if getElementType ( theplayer ) == "player" then moveObject (gateSWAT1, 2000, moveX, moveY, moveZ, rotx, roty, rotz ) end end addEventHandler( "onColShapeHit", swatcol1, openSWATGate1 ) addEventHandler ( "Open", root, openSWATGate1 ) function closeSWATGate1(thePlayer) if getElementType ( theplayer ) == "player" then moveObject (gateSWAT1, 2000, x, y, z, rotx, roty, rotz) end end addEventHandler( "onColShapeLeave", swatcol1, closeSWATGate1 ) addEventHandler ( "Close", root, closeSWATGate1) <gates> <gate Name=gateSWAT1 id= x="1283.5999755859" y="-1608" z="7.8000001907349" rotx="90" roty="0" rotz="89.994506835938" moveX="1283.5999755859" moveY="-1597" moveZ="7.8000001907349" /> </gates>
  13. resulted, but now, I want add one or more name gang for open the gate, how do I do?
  14. First, I need create one file will be compiled, but I want in this file (gate), add this local to other file (coordgate), where I will put my coord.How I can make this script?
  15. hello, I have one question, when I want make one file for only I can move, how I can do?(I know I need have moveObject getPlayerTeam getTeamName getElementData createObject colshape Example(otherFiled to put coord. of the gate): obj - id object cx - close x cy - close y cz - close z crx - close rotation x cry - close rotation y crz - close rotation z ox - open x oy - open y oz - open z orx - open rotation x ory - open rotation y orz - open rotation z ng - name gang nt - name team
  16. is working, thanks a lot for help me.
  17. local marker = createMarker(1262.7073974609, -1643.3990478516, 13, 'cylinder', 2, 255, 255, 255, 255) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} windowjob = guiCreateWindow(1031,232,301,397,"SWAT job",false) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(19,33,273,215,"To take SWAT team job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) function swatjob(hitElement) if (hitElement == localPlayer) then if (getElementData(hitElement, "gang") == "SWAT Team") then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end end addEventHandler("onClientMarkerHit", marker, swatjob) function swatjobleave(leaveElement) if getElementType(leaveElement) == "player" then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, swatjobleave) function joinTeam() triggerServerEvent("setswat",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeswatWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeswatWindow, false)
  18. no, didn't worked, I think need export the script
  19. No error, and when I enter on mark, I can't see the gui Edit:Here marker code: local marker = createMarker(1262.7073974609, -1643.3990478516, 13, 'cylinder', 2, 255, 255, 255, 255)
  20. Hello, I'm trying add marker and when enter with this name specific but I can't.I'm using gang_system from castillo function swatjob(hitElement) if (hitElement == localPlayer) then if ( getElementData ( hitElement, "Gang Name" ) == "SWAT Team" ) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end end addEventHandler("onClientMarkerHit", marker, swatjob)
  21. no, I have others maps but in debug script say this "Loading script fail:gangbase/FBIbase.lua:28: "}" expected (to close "{" at line 26)near "createObject" this is the script: (this script is start in line 26) Objects = { createObject(8673,915.90002441,-1051.90002441,38.20000076,0.00000000,0.00000000,0.00000000) --object(csrsfence03_lvs) (1) createObject(8673,925.90002441,-1041.44995117,38.20000076,0.00000000,0.00000000,90.00000000) --object(csrsfence03_lvs) (2) createObject(8661,907.00000000,-1032.65002441,26.70000076,90.00000000,0.00000000,90.00000000) --object(gnhtelgrnd_lvs) ( createObject(3565,938.40002441,-1015.59997559,36.40000153,0.00000000,0.00000000,0.00000000) --object(lasdkrt1_la01) (1) createObject(3565,938.40002441,-1015.59997559,36.40000153,0.00000000,180.00000000,0.00000000) --object(lasdkrt1_la01) (2) createObject(3565,934.98999023,-1015.79998779,32.20000076,0.00000000,90.00000000,0.00000000) --object(lasdkrt1_la01) (3) createObject(3565,938.40002441,-1015.59997559,39.00000000,0.00000000,0.00000000,0.00000000) --object(lasdkrt1_la01) (4) createObject(13011,908.79998779,-1030.09997559,106.69999695,0.00000000,0.00000000,0.00000000) --object(cos_sbanksteps04) (1) createObject(13011,919.40002441,-1013.59997559,106.69999695,0.00000000,0.00000000,180.00000000) --object(cos_sbanksteps04) (2) createObject(2932,914.20001221,-1012.20001221,111.50000000,0.00000000,0.00000000,90.00000000) --object(kmb_container_blue) (1) createObject(2924,913.00000000,-1013.72998047,111.19999695,0.00000000,0.00000000,0.00000000) --object(kmb_crash3door) (1) createObject(8661,907.90002441,-1043.19995117,30.59000015,0.00000000,0.00000000,0.00000000) --object(gnhtelgrnd_lvs) (1) createObject(8661,922.09997559,-1054.90002441,26.76000023,90.00000000,0.00000000,0.00000000) --object(gnhtelgrnd_lvs) (2) createObject(8661,897.00000000,-1054.90002441,26.76000023,90.00000000,0.00000000,0.00000000) --object(gnhtelgrnd_lvs) (3) createObject(8661,877.00000000,-1034.92004395,26.76000023,90.00000000,90.00000000,0.00000000) --object(gnhtelgrnd_lvs) (4) createObject(8661,932.40002441,-1034.93005371,36.74000168,0.00000000,0.00000000,90.00000000) --object(gnhtelgrnd_lvs) (5) createObject(8661,887.00000000,-1034.93005371,36.74000168,0.00000000,0.00000000,90.00000000) --object(gnhtelgrnd_lvs) (6) createObject(8661,908.59997559,-1044.93005371,36.74000168,0.00000000,0.00000000,0.00000000) --object(gnhtelgrnd_lvs) (7) createObject(16151,890.90002441,-1021.90002441,31.25000000,0.00000000,0.00000000,0.00000000) --object(ufo_bar) (1) createObject(925,877.90002441,-1037.19995117,32.00000000,0.00000000,0.00000000,90.00000000) --object(rack2) (1) createObject(8947,893.20001221,-1044.69995117,39.79999924,0.00000000,0.00000000,90.00000000) --object(vgelkup) (1) } for index, object in ipairs ( Objects ) do setElementDoubleSided ( object, true ) end
  22. in others scripts , this script don't work, "Objects = { ...... }" and for index, object in ipairs ( Objects ) do setElementDoubleSided ( object, true ) end , how I can make this script work for all maps?
  23. Didn't work because I don't see the objects
×
×
  • Create New...