Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Karuzo

  1. Yeah, i understand that. What i don't understand is, how I get to this decimal value generated by a hexadecimal value. F.e.: 0x12345678 How would the number look like if i want to set the Flag "AXLE_F_MCPHERSON" ?
  2. I never understood that conversion from bytes to flags, can you explain that to me?
  3. I already tried out onClientPreRender, but for some reason it just doesn't work. Guess rotating the wheels at all is not possible, but positionating them works for some reason.
  4. I think you didn't get what i'm trying to do: I'm trying to adjust the camber not the steering of the car. I tried with X,Y and Z but nothing changed. I want negative camber on my car:
  5. Suh dude, I have this strange problem with setting the rotation of the tires on a vehicle. I'm trying to adjust the camber of the tire but without any success so far. This is my current code: The camber variable is the position of a scrollbar. The variable frontcamber outputs the right rotation set but on the vehicle itself there is no visible change. local veh = getPedOccupiedVehicle(localPlayer) local frontRightTire = "wheel_rf_dummy" local frontLeftTire = "wheel_lf_dummy" local backRightTire = "wheel_rb_dummy" local backLeftTire = "wheel_lb_dummy" local mincamber = 0 local maxcamber = 30 if camber == 0 then setVehicleComponentRotation( veh, frontRightTire, 0, 0, mincamber ) setVehicleComponentRotation( veh, frontLeftTire, 0, 0, mincamber ) setVehicleComponentRotation( veh, backLeftTire, 0, 0, mincamber ) setVehicleComponentRotation( veh, backRightTire, 0, 0, mincamber ) elseif camber == 100 then setVehicleComponentRotation( veh, frontRightTire, 0, 0, maxcamber ) setVehicleComponentRotation( veh, frontLeftTire, 0, 0, maxcamber ) setVehicleComponentRotation( veh, backLeftTire, 0, 0, maxcamber ) setVehicleComponentRotation( veh, backRightTire, 0, 0, maxcamber ) elseif camber>0 and camber<100 then local acccamber = interpolateBetween(mincamber,0,0,maxcamber,0,0,camber/100,"Linear") setVehicleComponentRotation( veh, frontRightTire, 0, 0, acccamber, "world") setVehicleComponentRotation( veh, frontLeftTire, 0, 0, acccamber, "world") setVehicleComponentRotation( veh, backLeftTire, 0, 0, acccamber, "world") setVehicleComponentRotation( veh, backRightTire, 0, 0, acccamber, "world") local frontcamber = getVehicleComponentRotation(veh,frontLeftTire) outputChatBox(frontcamber) end
  6. I tried it out: This is with a radius of 10. Is this the right radius? Because i get weird results if i use > 10 or < 10
  7. Hey, So i basically have this problem with my server: ERROR: Could not load /mods/deathmatch/dbconmy.so - mods/deathmatch/dbconmy.so: symbol _[6;1H_cxa_pure_virtual, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference I asked my support but they don't know whats the problem. I'm using db*-Functions in my script. Some more details: Root Server (129.219) Debian 7 (Wheezy) 40GB RAM 6 Core We installed the libmysqlclient.so.16 from this site: https://wiki.multitheftauto.com/wiki/In ... leshooting I hope you can help us/me.
  8. I solved the problem by switching to mysql instead of sqlite. Sqlite did not refresh the database when i tried to buy the car.
  9. After i sold my car it does not output anything. But if i already have a car it outputs all the datas such as color,model etc..
  10. Which result do you mean? num_rows outputs 1 for some reason.
  11. Hey Guys, So i have a problem with my car shop. I have a command with which you can sell the car. So i delete the row in the database, but after you sold the car you can't buy a new one somehow. This is my code: Buy Function: addEvent("CarBuy",true) function CarBuyFunc(lp,veh,price) local db = dbConnect("sqlite","susa_data/accounts.db") local sx,sy,sz = -1935.45764, 269.70041, 44.49506 local query = dbQuery(db,"SELECT * FROM cars WHERE OWNER=?",username) --... if money > tonumber(price) then local result,num_rows = dbPoll(query,-1) if num_rows == 0 then setPlayerMoney(lp,money-price) local exec = dbQuery(db,"INSERT INTO cars(CARID,SPAWNX,SPAWNY,SPAWNZ,ROTX,ROTY,ROTZ,OWNER,CARKEY,R,G,B,PRICE) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",carid,sx,sy,sz,0,0,50,username,carkey,r,g,b,price) if exec then outputDebugString("Inserting Car Shop successfull!") dbFree(exec) else outputDebugString("Inserting Car Shop wasn't successfull!") end local spawnedVehicle = createVehicle(carid, sx, sy, sz, 0, 0, 50) setElementData(spawnedVehicle, "Owner", username) warpPedIntoVehicle(lp,spawnedVehicle) else outputChatBox("You already have a car!",lp,180,0,0,false) end else outputChatBox("You don't have enough money to buy this Car!",lp,180,0,0,false) end end addEventHandler("CarBuy",root,CarBuyFunc) My sell function: ddCommandHandler("sellmycar", function(player,cmd) local price local pName = getElementData(player,"username") local sql = dbQuery(db,"SELECT * FROM cars WHERE OWNER=?",pName) local result, num_rows = dbPoll(sql, -1) local money = getPlayerMoney(player) if num_rows >= 1 then for _, row in pairs (result) do price = row["PRICE"] end local sellprice = price * 0.40 dbExec(db,"DELETE FROM cars WHERE OWNER=?",pName ) outputChatBox("You just sold your car for 40% of the original price: "..sellprice,player,0,180,0) setPlayerMoney(player,money+sellprice,false) for _, veh in pairs ( getElementsByType("vehicle") ) do if(tostring(getElementData(veh, "Owner")) == tostring(pName)) then destroyElement(veh) end end end end)
  12. Hey Guys, I need to know how i can ask if the driver is sitting in a car and the player who wants to enter the car is not going to sit in the drivers seat. With this code i can enter the vehicle as a passenger when nobody is driving the car. But i can't enter the vehicle as a passenger if a driver is sitting in the car. Obviously it's because of the drv == false statement, how can i fix this ? addEventHandler("onVehicleStartEnter",root, function(plr) local username = getElementData(plr,"username") local seat = getPedOccupiedVehicleSeat(plr) local drv = getVehicleOccupant(source,0) local owner = getElementData(source,"Owner") if owner == username then outputChatBox("Press 'X' for Engine and 'L' for the Lights",plr,0,180,0,false) bindKey(plr,"x","down",Engine) bindKey(plr,"l","down",Light) elseif seat ~= 0 and drv == false then return true else cancelEvent() outputChatBox("This is not your car! This car belongs to: "..owner.." .If you already have one use /getmycar !",plr,180,0,0,false) end end ) Thanks.
  13. Karuzo

    The last reply

    Why are you still not banned?
  14. FAKE: http://community.mtasa.com/index.php?p= ... s&id=10107 ORIGINAL: http://community.mtasa.com/index.php?p= ... ls&id=5946 DONE
  15. It's not a fake. As you can see the uploader is the same. I guess he just uploaded it wrong the 1st time. And the "Fake" was uploaded 5 Minutes before the "Original".
  16. Karuzo

    The last reply

    I like this advice, wait. WHAT?
  17. Karuzo

    The last reply

    Get Shrekt m8 swaggin s0n
  18. No. Just no. Dapie is my friend and you had no rights to edit HIS code. Also you wrote that the credits are goin' to you.And then you even compiled(?!) the script. I mean, even the file names were dfup_lp ( which was the ones from dapie.) So please stop stealing scripts and sharing them under your name, or even better, leave this community, we don't need guys like you.
  19. Fake: http://community.mtasa.com/index.php?p= ... s&id=10032 Original: http://community.mtasa.com/index.php?p= ... ls&id=8971 DONE
  20. It is 6000x6000. Tho it can go up to 8192 or smth like that (but that is just water).
  • Create New...