Jump to content

Vercetti1010

Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by Vercetti1010

  1. so is there any way that I could accomplish this task?
  2. if i can remember it was something about them being null or bad arguements or something
  3. that kind of works. if i enter any car it expels me, if i give myself a car with admin CP and get out and get back it it expels me. however if i give myself a car with CP and park it, get out then back in it starts for me. any soltions? function publicPark ( thePlayer ) playervehicle = getPlayerOccupiedVehicle ( thePlayer ) playername = getVehicleOccupant ( playervehicle, 0 ) id = getVehicleID ( playervehicle ) if ( playervehicle ) then if id == 444 or id == 556 or id == 557 or id == 406 then setVehicleFrozen ( playervehicle, true ) setVehicleDamageProof ( playervehicle, true ) setVehicleOverrideLights ( playervehicle, 1 ) setVehicleEngineState ( playervehicle, false ) authorized = getClientName ( playername ) setElementData ( playervehicle, "parkedby", playername ) outputChatBox ( "Vehicle Parked", thePlayer, 255, 0, 0 ) else if ( playervehicle ) then if isVehicleOnGround ( playervehicle ) then setVehicleFrozen ( playervehicle, true ) setVehicleDamageProof ( playervehicle, true ) setVehicleOverrideLights ( playervehicle, 1 ) setVehicleEngineState ( playervehicle, false ) setElementData ( playervehicle, "parkedby", playername ) outputChatBox ( "Vehicle Parked", thePlayer, 255, 0, 0 ) end end end end end function playerExpel ( thePlayer ) if ( getElementData ( playervehicle, "parkedby" ) == playername ) then setVehicleFrozen ( playervehicle, false ) setVehicleDamageProof ( playervehicle, false ) setVehicleOverrideLights ( playervehicle, 0 ) setVehicleEngineState ( playervehicle, true ) outputChatBox ( "Vehicle Started", thePlayer, 255, 0, 0 ) else removePlayerFromVehicle ( thePlayer ) outputChatBox ( "This is not your vehicle!", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "parkcar", publicPark ) addEventHandler ( "onVehicleEnter", getRootElement(), playerExpel ) I get errors for the elementData stuff. i dont have much faith for this script anymore if i cant figure something out soon
  4. i suck at xml stuff. i have no idea how to do that
  5. Hey guys. this script is perfect except for that it wont remember the players name. Essentially what i want it to do is when the player sends the command it parks the car and remembers who parks it. if the person who parked it gets back in then it should start automatically and if it isnt then it expels the player from the car. the problem is that I park the car and when i get back in it expels me. how can i get it to remember me? function publicPark ( thePlayer ) playervehicle = getPlayerOccupiedVehicle ( thePlayer ) playername = getVehicleOccupant ( playervehicle, 0 ) id = getVehicleID ( playervehicle ) if ( playervehicle ) then if id == 444 or id == 556 or id == 557 or id == 406 then setVehicleFrozen ( playervehicle, true ) setVehicleDamageProof ( playervehicle, true ) setVehicleOverrideLights ( playervehicle, 1 ) setVehicleEngineState ( playervehicle, false ) authorized = getClientName ( playername ) outputChatBox ( "Vehicle Parked", thePlayer, 255, 0, 0 ) else if ( playervehicle ) then if isVehicleOnGround ( playervehicle ) then setVehicleFrozen ( playervehicle, true ) setVehicleDamageProof ( playervehicle, true ) setVehicleOverrideLights ( playervehicle, 1 ) setVehicleEngineState ( playervehicle, false ) outputChatBox ( "Vehicle Parked", thePlayer, 255, 0, 0 ) end end end end end function playerExpel ( thePlayer ) if ( authorized ) then setVehicleFrozen ( playervehicle, false ) setVehicleDamageProof ( playervehicle, false ) setVehicleOverrideLights ( playervehicle, 0 ) setVehicleEngineState ( playervehicle, true ) outputChatBox ( "Vehicle Started", thePlayer, 255, 0, 0 ) else removePlayerFromVehicle ( thePlayer ) outputChatBox ( "This is not your vehicle!", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "parkcar", publicPark ) addEventHandler ( "onVehicleEnter", getRootElement(), playerExpel )
  6. wow, this worked. thank you so much 50p. you are very skilled at this.
  7. ok, with commands i was able to close the window, but i need to make it so the button does it. It wont do it though. could someone help me out here? the button does nothing. function colorChart ( ) showCursor ( true ) colormenu = guiCreateWindow ( 0.15, 0.53, 0.7, 0.34, "The Color IDs", true ) closemenu = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "Close", true, colormenu ) guiWindowSetMovable ( colormenu, true ) guiWindowSetSizable ( colormenu, true ) guiCreateStaticImage ( 0.15, 0.33, 0.6, 0.33, "img/colorchart.png", true, colormenu ) end function windowClose ( ) destroyElement ( colormenu ) showCursor ( false ) end addCommandHandler ( "colorids", colorChart ) addEventHandler ( "onClientGUIClick", closemenu, windowClose )
  8. yeah, but the window does not show up at all. does that one bad thing sabotage the whole thing or something
  9. i want it to display a window which has the color chart in it and a close button
  10. hey guys, i need a little help here, im trying to make a good car colors script for anyone to use. i got the functionality down, i just need to make a color chart for noobs to see so they know what car color they want. here is an example of my script. function colorChart ( theResource ) if theResource ~= getThisResource() then return end colorMenu = guiCreateWindow ( 0.15, 0.33, 0.7, 0.34, "The Color IDs", true ) colorMenuCloseButton = guiCreateButton ( 0.4, 0.85, 0.20, 0.15, "Close", true, colorMenu ) guiWindowSetMovable ( colorMenu, false ) guiWindowSetSizable ( colorMenu, false ) guiCreateStaticImage ( 0.15, 0.33, 0.6, 0.33, colorchart.png, true, colorMenu ) end end function windowClose ( ) if ( colorMenu ) then destroyElement ( colorMenu ) end end addCommandHandler ( "colorids", colorChart ) addEventhandler ( "onClientGUIClick", colorMenuCloseButton, windowClose ) thats the client side script (not putting serverside, it works) <meta> <info author="masterOfPuppets" version="1.0" /> <script src="color.lua" type="server" /> <script src="colorgrid.lua" type="client" /> <file src="img/colorchart.png" /> </meta> thats the xml. can anyone help me get the ID chart to work?
  11. thank you guys. i feel dumb now lol. i can make active gates for area 51 but cant figure this out
  12. hey guys, i need your help a bit. forever and ever people have been complaining about not having a skin command. we had one working but it doesnt appear to work anymore. no one seems to have any idea how to make it either, could any of you guys point me in the right direction here?
  13. i figured it out, thanks for all your help
  14. its in the syntax but the server thinks it is an invalid character
  15. hmm....i get a script error that says this: unexpected symbol near "["
  16. still not working. i get an error loading the script. here is the script here. can anyone tell me how to fix it?
  17. hello. i have quite a problem here. I am trying to make area51 gated and the gates me movable by a command. the problem is, i dont know how to tell the game which object to move. its almost difficult explaining the problem really. basically what i am aiming to do is incoprporate this into our admin scripts so that admins can fly in and out and open and shut gates while players flying in will blow up and they cant open the gates. i have a good plan going here. for opening of gates, i will use moveObject (cant tell the game which object to move though) i will use createexplosion to make well..explosions at the player if they are not an admin. basically i need to define which object needs to be moved. can someone give me a hand?
  18. ive been testing and i determined the mod was just weird. i did it with another model and all was well. one thing went awry though. if i reconnected i crashed and when i came back cars had no texture. i had to refresh the resource to make it work, but i cant do that if many people come on the server. i know why that is though. there is a replaceDff but there isnt a replaceTxd. theres only a loadTxd, which means that it is not possible for this to be user friendly at the moment. its too much of a hassle to have modded cars.
  19. this works perfect for me except when i spawn the modded car. i replaced a bullet with a ford gt and it was great. the only problem is that when i spawn the bullet, the textures mess up (i.e. wheels looking all chromey and stuff, you could say the texture halfway works) and i end up sitting in the middle of the car. what is the cause and/or solution for this?
  20. thank you. i appreciate the relevant answer. i guess you could have told by now that im a newbie. im glad to get some help and not just the wiki or someone telling me that this has been discussed already (not going to name any names)
  21. k, here is the situation. i need some help on making a script that sets a players money to x amount when he spawns. ive been around the forums and the example scripts dont work. yes, i put it at the end of broph. please give me information that a person new to lua would understand, dont just give me a link to the wiki. oh one more note, id rather this be a separate script so we dont have to rely on broph.
  22. our server needs this command too. the wiki entry doesnt help all that much. i need to make it so that the person in the vehicle sticks a player on his vehicle. i have no idea how to script that though. can i get some help? lol
  23. never mind, i figured it out.
  24. hey guys, i need a litle help. im trying to make a script (ints my 1st one) but it doesnt appear to work. i need a script that can lock a car that im in. preferably it will remember me as the car owner and only allow me in, and i can unlock it as well. can i have some help? also im accepting help at [email protected] on MSN. i want to be my servers scripter but im new to this completley. i just now picked up lua. the wiki doesnt really help me much.
×
×
  • Create New...