Plantjen

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Plantjen

  • Rank
    Vic
  1. I can't quite get it to work though This script should create a ped in the Las Venturas Planning Department that sits in the chair at the front desk. When I run this code, the ped spawns and sits down, but then continuously rotates 180 degrees back and forth. A strange detail is that it only rotates when I move my mouse or press the keyboard, as long as i don't touch both mouse and keyboard, the ped performs its normal animation. Sidenote: In my code I'm using a timer, because it doesn't seem to work to set a ped's animation right after creating it. If there's a better way without timer, it would be great if anybody could tell me. My server code: townhallWorker = createPed ( 17, 359.72, 173.544, 1008.39, 270 ) setElementInterior(townhallWorker, 3) setElementDimension (townhallWorker, 2) setTimer ( function() local useditemdummy = createObject(1714, 359.051, 173.585, 1007.38, 0, 0, 90.719604) setElementInterior(useditemdummy, 3) setElementDimension (useditemdummy, 2) setElementData(townhallWorker, "itembeingused", useditemdummy, false) attachElements(townhallWorker, useditemdummy, -0.5, 0, .3) setElementRotation(townhallWorker, 0,0, 270) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 150) setElementFrozen ( townhallWorker, true ) setPedAnimation(townhallWorker, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, false, false, false, true) end , 1000, 0 ) Any help would be greatly appreciated!
  2. Thanks a lot, this has been very useful to me, now I can make my peds sit and interact with objects.
  3. RRtaxi is a mod which lets you do taxi missions. Instead of driving players, as with most taxi resources, you are driving bots. That makes this script especially usefull for servers that don't have too many players online at the same time, or lan-servers. Now you don't have to wait for ages as a taxi driver until finaly somebody needs your services, there's always work for you to do. INSTALLATION: copy rrtaxi.zip to your resources directory and add the following line to your mtaserver.conf: INGAME: Players with a bus- or limo driver skin can do taxi missions, this because it makes it easy to implement in any server for quick testing and it can be easily changed. PLAYER COMMANDS: /startjob - starts the taxi mission /quitjob - aborts the taxi mission NOTE: if you don't have the right skin, it will output that you don't have a job. ADMIN COMMANDS: /addPickup - adds your current location as a taxi pickup and dropoff location Currently, the city of Las Venturas is pretty much covered with pickup points, but the other cities are not. Those need to be manually added using the /addPickup command. This is my first ever lua script, so please bear with me. Helpful feedback is appreciated. TODO: The current taxi rewards only depend on distance, I might make it depend on time and driving skills(by calculating damage the vehicle took during the ride) as well. I make no promises on that though, since im also working on other scripts. You can download here: http://community.mtasa.com/index.php?p=resources&s=details&id=2053
  4. Though it seems very strange to me it does work! Thank you a lot, now i can also make progress on other scripts
  5. I'm starting to learn a little bit of lua, but there's some very basic thingy that i just can't get right. I have the following code in my server file that i use to lock/unlock cars. This code is from the speedometer(http://community.mtasa.com/index.html?p=resources&s=details&id=5) resource by 50p function lock_unlockDoor( player ) local playername = getPlayerName ( player ) local veh = getPedOccupiedVehicle( player ) local lock = isVehicleLocked( veh ) if veh and lock == false then setVehicleLocked( veh, true ) outputChatBox("Car locked",playername,255,255,0,255) elseif veh and lock == true then setVehicleLocked( veh, false ) outputChatBox("Car unlocked",playername,255,255,0,255) end end I wanted to change it so that only the player that locks the car gets the message 'Car locked' or 'Car unlocked'. Currently if i lock a car, the message is shown to every player in the server. What have i done wrong? Any help will be very much appreciated