Jump to content

Captain Cody

Members
  • Posts

    2,753
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Captain Cody

  1. Is there a way to load colision files?
  2. well 1. Every other post was answerd that ive seen 2. I just though of it I dont think I saved it as a folder
  3. why do barly any of my posts get answerd ive posted at least 4 things that still have yet to be solved
  4. I found a fuel system that im planning on using but How would I make command to add a fuel pump at the location im standing at when the command is triggerd "Fort Carson" x="70.4" y="1218.5" z="16"> "64" y="1220" z="19" /> "70.4" y="1218.5" z="19" /> "76.8" y="1217" z="19" /> "Entrance LV" x="2120" y="923" z="11"> "2110" y="923" z="11" /> "2115" y="923" z="11" /> "2120" y="923" z="11" /> "2110" y="912" z="11" /> "2115" y="912" z="11" /> "2120" y="912" z="11" /> "near Police LV" x="2199" y="2480" z="11"> "2194" y="2480" z="11" /> "2194" y="2475" z="11" /> "2194" y="2470" z="11" /> "2205" y="2480" z="11" /> "2205" y="2475" z="11" /> "2205" y="2470" z="11" /> "near Stade LV" x="1590" y="2200" z="11"> "1590" y="2196" z="11" /> "1590" y="2207" z="11" /> "1595" y="2196" z="11" /> "1595" y="2207" z="11" /> "1600" y="2196" z="11" /> "1600" y="2207" z="11" /> "near villas in LV" x="2141.9211425781" y="2755.2111816406" z="11"> "2142" y="2740" z="11" /> "2147" y="2740" z="11" /> "2152" y="2740" z="11" /> "2142" y="2750" z="11" /> "2147" y="2750" z="11" /> "2152" y="2750" z="11" /> "Station" x="-1329" y="2671" z="50"> "-1329" y="2671" z="50" /> "-1328" y="2677" z="50" /> "-1327" y="2683" z="50" /> "sf 1" x="-1670" y="421" z="7"> "-1680" y="412" z="7" /> "-1665" y="414" z="7" /> "-1670" y="421" z="7" /> "-1674" y="405" z="7" /> "sf 2" x="-2413" y="970" z="45"> "-2413" y="970" z="45" /> "-2408" y="970" z="45" /> "-2413" y="980" z="45" /> "-2408" y="980" z="45" /> "WHETSTONE" x="-2244" y="-2561" z="31"> "-2244" y="-2561" z="313" /> "-2248" y="-2558" z="32" /> "Dollimoure" x="653" y="-570" z="16"> "653" y="-570" z="16" /> "658" y="-570" z="16" /> "653" y="-560" z="16" /> "658" y="-560" z="16" /> "LS ENTRANCE" x="-94" y="-1161" z="2"> "-94" y="-1161" z="3" /> "-99" y="-1173" z="3" /> "-93" y="-1176" z="3" /> "-88" y="-1165" z="3" /> "LS IGS" x="1945" y="-1771" z="12"> "1945" y="-1771" z="13" /> "1939" y="-1771" z="13" /> "1939" y="-1777" z="13" /> "1945" y="-1777" z="13" /> "LS 3" x="1008" y="-939" z="40"> "1008" y="-939" z="42" /> "1008" y="-933" z="42" /> "998" y="-940" z="42" /> "998" y="-934 " z="42" /> "highway SF LS" x="-1602" y="-2710" z="48"> "-1600" y="-2706" z="49" /> "-1603" y="-2711" z="49" /> "-1606" y="-2715" z="49" /> "-1609" y="-2720" z="49" /> "CJ Petrol station SF" x="-2023" y="157" z="28"> "-2023" y="157" z="28" /> "Montgomery Village" x="1380" y="463" z="20"> "1378.5" y="458.5" z="20" /> "1383" y="456" z="20" /> "Tierra Robada" x="-1464" y="1858" z="32"> "-1464" y="1858" z="33" /> "-1477" y="1857" z="33" /> "-1477" y="1865" z="33" /> "-1465" y="1866" z="33" /> -Note no accually a lua file just put it in there for easy veiwing
  5. There is a command in here to save the car location but it doesnt respawn at the persons house with the scripts I have
  6. 1.How can I make it so when the cars explode they wont respawn 2.How can I make it so when I do /respawn it respawns the cars at the peoples houses who bought them Client GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} localPlayer = getLocalPlayer () local screenWidth, screenHeight = guiGetScreenSize() function showCarBuyMenu( price ) showCursor ( true ) GUIEditor_Window[1] = guiCreateWindow(0.3281,0.35,0.2362,0.2778,"This car is for sale",true) GUIEditor_Label[1] = guiCreateLabel(0.0265,0.088,0.9418,0.228,"Price: "..tostring(price).."$",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Button[1] = guiCreateButton(0.1905,0.352,0.6243,0.252,"Buy",true,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Button[2] = guiCreateButton(0.2831,0.7,0.4101,0.16,"Close",true,GUIEditor_Window[1]) addEventHandler("onClientGUIClick", GUIEditor_Button[1], function () guiSetVisible ( GUIEditor_Window[1], false ) triggerServerEvent ( "acceptBuyCar", getLocalPlayer()) showCursor ( false ) toggleAllControls ( true ) end ,false) addEventHandler("onClientGUIClick", GUIEditor_Button[2], function () guiSetVisible ( GUIEditor_Window[1], false ) toggleAllControls ( true ) setControlState ( "enter_exit", true ) showCursor ( false ) end ,false) end addEvent( "showBuyCar", true ) addEventHandler( "showBuyCar", getRootElement(), showCarBuyMenu ) Server cars={} buycarpickup={} maxcars = 0 addEventHandler ( "onResourceStart", getResourceRootElement(), function () local root = xmlLoadFile ("cars.xml") local houseroot = xmlFindChild (root,"cars",0) if (houseroot) then for i,v in ipairs (xmlNodeGetChildren(houseroot)) do local carmodel = xmlNodeGetAttribute (v,"model") local x = xmlNodeGetAttribute (v,"x") local y = xmlNodeGetAttribute (v,"y") local z = xmlNodeGetAttribute (v,"z") local color1 = xmlNodeGetAttribute (v,"color1") local color2 = xmlNodeGetAttribute (v,"color2") local owner = xmlNodeGetAttribute (v,"owner") local price = xmlNodeGetAttribute (v,"price") local lock = xmlNodeGetAttribute (v,"lock") local a = xmlNodeGetAttribute (v,"a") cars[i] = createVehicle ( tonumber(carmodel),tonumber(x),tonumber(y),tonumber(z), 0, 0, tonumber(a) ) setElementInterior ( cars[i], 0 ) setElementData (cars[i],"xpos",tonumber(x)) setElementData (cars[i],"ypos",tonumber(y)) setElementData (cars[i],"zpos",tonumber(z)) setElementData (cars[i],"angle",tonumber(a)) setElementData (cars[i],"owner",owner) setElementData (cars[i],"price",tonumber(price)) setElementData (cars[i],"lock",tonumber(lock)) setElementData (cars[i], "num", i ) setVehicleColor ( cars[i], tonumber(color1), tonumber(color2), 0, 0 ) if(lock == 1) then setVehicleLocked ( car, true ) end if getElementData ( cars[i], "owner" ) == "Nobody" then buycarpickup[i] = createPickup ( x, y, z, 3, 1274 ) attachElements ( buycarpickup[i], cars[i], 0, 0, 1.9 ) end maxcars = maxcars+1 end outputDebugString ("Cars loaded!") end end ) function saveCars () local root = xmlLoadFile ("cars.xml") local houseroot = xmlFindChild (root,"cars",0) if (houseroot) then for i,v in ipairs (xmlNodeGetChildren(houseroot)) do local color1, color2, color3, color4 = getVehicleColor ( cars[i] ) xmlNodeSetAttribute ( v, "model", getElementModel(cars[i]) ) xmlNodeSetAttribute ( v, "x", getElementData(cars[i], "xpos") ) xmlNodeSetAttribute ( v, "y", getElementData(cars[i], "ypos") ) xmlNodeSetAttribute ( v, "z", getElementData(cars[i], "zpos") ) xmlNodeSetAttribute ( v, "a", getElementData(cars[i], "angle") ) xmlNodeSetAttribute ( v, "color1", color1 ) xmlNodeSetAttribute ( v, "color2", color2 ) xmlNodeSetAttribute ( v, "owner", getElementData(cars[i], "owner") ) xmlNodeSetAttribute ( v, "price", getElementData(cars[i], "price") ) xmlNodeSetAttribute ( v, "lock", getElementData(cars[i], "lock") ) end xmlSaveFile(root) end end function adminCreateVehicle ( source, cmd ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then local root = xmlLoadFile ("cars.xml") local houseroot = xmlFindChild (root,"cars",0) local createdcar = xmlCreateChild ( houseroot, "vehicle" ) local carmodel = xmlNodeSetAttribute ( createdcar, "model", "451" ) local x, y, z = getElementPosition ( source ) local xa,ya,a = getElementRotation ( source ) xmlNodeSetAttribute ( createdcar, "x", x ) xmlNodeSetAttribute ( createdcar, "y", y ) xmlNodeSetAttribute ( createdcar, "z", z ) xmlNodeSetAttribute ( createdcar, "a", a ) xmlNodeSetAttribute ( createdcar, "color1", "0" ) xmlNodeSetAttribute ( createdcar, "color2", "0" ) xmlNodeSetAttribute ( createdcar, "owner", "Nobody" ) xmlNodeSetAttribute ( createdcar, "price", "0" ) xmlNodeSetAttribute ( createdcar, "lock", "0" ) cars[maxcars+1] = createVehicle ( 451,x,y,z,0,0,a ) setElementData (cars[maxcars+1],"xpos",x) setElementData (cars[maxcars+1],"ypos",y) setElementData (cars[maxcars+1],"zpos",z) setElementData (cars[maxcars+1],"angle", a) setElementData (cars[maxcars+1],"owner","Nobody") setElementData (cars[maxcars+1],"price",0) setElementData (cars[maxcars+1],"lock",0) xmlSaveFile(root) maxcars = maxcars+1 else outputChatBox ("Error: You can't use this command",source, 255,255,127 ) end end addCommandHandler ("acarcreate", adminCreateVehicle) addCommandHandler ("acarsave", saveCars) function getCar ( car ) return cars[car] end function enterVehicle ( source, seat, jacked ) local playercar = getPedOccupiedVehicle ( source ) if(seat == 0) then if (getElementData ( playercar, "owner" )) then if(getElementData ( playercar, "owner" ) ~= "Nobody" ) then if(getElementData ( playercar, "owner" ) == getPlayerName ( source )) then outputChatBox ("It is your car!",source, 255,255,127 ) else outputChatBox ("This vehicle owner: "..getElementData ( playercar, "owner" ).."",source, 255,255,127 ) end else local price = getElementData ( playercar, "price" ) triggerClientEvent ( source, "showBuyCar", source, price) toggleAllControls ( source, false, true, false ) return true end end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) function AcceptToBuyCar ( ) local playercar = getPedOccupiedVehicle ( source ) if(getElementData ( playercar, "owner" ) == "Nobody") then if(getPlayerMoney ( source ) > tonumber(getElementData ( playercar, "price"))) then setElementData ( playercar, "owner", getPlayerName ( source )) takePlayerMoney ( source, tonumber(getElementData ( playercar, "price" ))) toggleAllControls ( source, true ) outputChatBox ("You buy this car!", source, 243,149,72 ) destroyElement(buycarpickup[getElementData(playercar,"num")]) saveCars () else outputChatBox ("Error: You don't have enought money", source, 243,149,72 ) setControlState ( source, "enter_exit", true ) end end end addEvent("acceptBuyCar",true) addEventHandler("acceptBuyCar",root,AcceptToBuyCar) function playerCarLock ( source, cmd) for i,v in ipairs (cars) do if(getElementData ( cars[i], "owner" ) == getPlayerName ( source )) then setVehicleLocked ( cars[i], true ) setElementData (cars[i],"lock", 1) outputChatBox ("You closed your car",source, 243,149,72 ) saveCars() end end end addCommandHandler ("lockmycar",playerCarLock) function playerCarUnLock ( source, cmd) for i,v in ipairs (cars) do if(getElementData ( cars[i], "owner" ) == getPlayerName ( source )) then setVehicleLocked ( cars[i], false ) setElementData (cars[i],"lock", 0) outputChatBox ("You opened your car",source, 243,149,72 ) saveCars() end end end addCommandHandler ("unlockmycar",playerCarUnLock) Other function adminSetCarModel ( source, cmd, model ) if(model) then if((tonumber(model) > 399) and (tonumber(model) < 612))then local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) setElementModel (playercar,tonumber(model)) saveCars() else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end else outputChatBox ("Error: You can't use this command",source, 255,255,127 ) end else outputChatBox ("Error: Model ID must be between 400 and 611",source, 255,255,127 ) end else outputChatBox ("Правильно: /acarmodel vehicle model",source, 255,255,127 ) end end addCommandHandler ("acarmodel", adminSetCarModel) function adminSetCarColor ( source, cmd, color1, color2 ) if(color2) then local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) setVehicleColor (playercar,color1,color2,0,0) saveCars() else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end else outputChatBox ("Error: You can't use this command",source, 255,255,127 ) end else outputChatBox ("Correct: /acarcolor [color 1] color 2",source, 255,255,127 ) end end addCommandHandler ("acarcolor", adminSetCarColor) function adminSetCarPrice ( source, cmd, carprice ) if(carprice) then local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) setElementData(playercar, "price", tonumber(carprice)) outputChatBox ("You set car "..tostring(playercar).." price $"..tostring(carprice).."",source, 243,149,72 ) saveCars() else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end else outputChatBox ("Error: You can't use this command",source, 255,255,127 ) end else outputChatBox ("Correct: /acarprice car price",source, 255,255,127 ) end end addCommandHandler ("acarprice", adminSetCarPrice) function adminSetCarPark ( source, cmd) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) local x, y, z = getElementPosition ( source ) local xa,ya,a = getElementRotation ( source ) setElementData (playercar,"xpos",x) setElementData (playercar,"ypos",y) setElementData (playercar,"zpos",z) setElementData (playercar,"angle",a) outputChatBox ("You set car "..tostring(playercar).." spawn point",source, 243,149,72 ) saveCars() else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end else outputChatBox ("Error: You can't use this command",source, 255,255,127 ) end end addCommandHandler ("acarpark", adminSetCarPark) function playerCarPark ( source, cmd) if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) if(getElementData ( playercar, "owner" ) == getPlayerName ( source )) then local x, y, z = getElementPosition ( source ) local xa,ya,a = getElementRotation ( playercar ) setElementData (playercar,"xpos",x) setElementData (playercar,"ypos",y) setElementData (playercar,"zpos",z) setElementData (playercar,"angle",a) outputChatBox ("You parked your car, don't forget to close it!",source, 243,149,72 ) saveCars() else outputChatBox ("Error: It is not your car!",source, 255,255,127 ) end else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end end addCommandHandler ("carpark",playerCarPark) function playerCarSell ( source, cmd) if(isPedInVehicle(source)) then local playercar = getPedOccupiedVehicle ( source ) if(getElementData ( playercar, "owner" ) == getPlayerName ( source )) then setElementData (playercar,"owner","Nobody") givePlayerMoney ( source, getElementData ( playercar, "price" )/100*50 ) outputChatBox ("You sold your car!",source, 243,149,72 ) saveCars() else outputChatBox ("Error: It is not your car!",source, 255,255,127 ) end else outputChatBox ("Error: You isn't in car",source, 255,255,127 ) end end addCommandHandler ("carsell",playerCarSell)
  7. can some one give me an answer not one of my posts were answered fully
  8. nope it translated it wrong ):
  9. How would I make my zombie script only work in dem 2? I would like to set up my server with Rp in dem 1 then if admins get bored or something zombies in dem 2
  10. No I tried that I know its possible because I've been on a server with a wheel size adjuster
  11. there has to be a way to do it
  12. He wants to have an interactive map of his server on his website
  13. hm Im not sure about that one
  14. What do you mean by that
  15. Is There any way possiable to change wheel size on car? I would really like to make my trucks wheels bigger and make some cars wheels bigger and some smaller
  16. Send me script on skype -codylewiz
  17. im good with editing scripts wat you need
  18. Another thing is post a reply-
  19. Im Looking for a scripter for my server BoDRPG I wont be able to pay untill we get donaters but we can work out a price to pay monthly I currently need lots of scripts made so if your interested Drop a message by skype or go to BoD rpg and talk to Codylewiz Skype: Codylewiz I would greatly appreciate it if I can get a scripter then can script good and doesn't charge insane prices if your those two please send me a message.
  20. Captain Cody

    BoD RPG

    DownLoad Speed Flys By Depending On Location Web Site: http://bodrpg.wix.com/bodrpg Forums:http://bodforums.forumer.com/forums/68#.VBR2fBZgnct Server Name:BoDRoleplay Ip To Get On Server:mtasa://97.93.163.146:22003 If Your good to the staff the staff will be good to you. Once we get donators I'll Update to a new website host with built in forums. Most Admins on duty will have a military skin S mods will have a swat skin Or a navy/air force skin The Owners Are: Scripter, Creator And Owner: CodyLewiz Original Creator and Owner: [boD]REAPER[L] Owner: [boD]Pump[CMDR] Active Admins: Erran "During Night" Jaspeont Virus? Active Moderators: Rion "Errans Bro On At Night" DarekFoster Dj_PHONE_HOME Dimos If You Think you're a worthy Admin Or Mod Talk to CodyLewiz More Info Will Be Added Soon
  21. How can I make it so it keeps skin
×
×
  • Create New...