Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. The problem is resolved, thank you 50p.
  2. 'source' is the player that entered the vehicle, you must use the first argument instead of 'source' at getVehicleName.
  3. You should make a table of the buses, then destroy old one.
  4. Your problem is at the client side, here: triggerServerEvent("StartBusJob", getRootElement()) It should be: triggerServerEvent("StartBusJob", localPlayer)
  5. Castillo

    zombie kill

    killPed is a server side function.
  6. Castillo

    zombie kill

    getElementByType It's: getElementsByType
  7. function saveColours ( playerSource ) local playerAccount = getPlayerAccount ( playerSource ) local playerVehicle = getPlayerOccupiedVehicle ( playerSource ) if ( playerAccount ) and not isGuestAccount ( playerAccount ) then local color1, color2, color3, color4 = getVehicleColor ( playerVehicle ) local r, g, b = getVehicleHeadLightColor ( playerVehicle ) setAccountData ( playerAccount, "idd.ccolor1", colour1 ) setAccountData ( playerAccount, "idd.ccolor2", colour2 ) setAccountData ( playerAccount, "idd.ccolor3", colour3 ) setAccountData ( playerAccount, "idd.ccolor4", colour4 ) setAccountData ( playerAccount, "idd.cchcr", r) setAccountData ( playerAccount, "idd.cchcg", g) setAccountData ( playerAccount, "idd.cchcb", b) end end addCommandHandler("saveColours", saveColours) function setCarColours(_, playerAccount) local playerVehicle = getPlayerOccupiedVehicle ( source ) local color1 = getAccountData ( playerAccount, "idd.ccolor1") local color2 = getAccountData ( playerAccount, "idd.ccolor2") local color3 = getAccountData ( playerAccount, "idd.ccolor3") local color4 = getAccountData ( playerAccount, "idd.ccolor4") local r = getAccountData ( playerAccount, "idd.cchcr" ) local g = getAccountData ( playerAccount, "idd.cchcg" ) local b = getAccountData ( playerAccount, "idd.cchcb" ) setVehicleColor ( playerVehicle, color1, color2, color3, color4 ) getVehicleHeadLightColor ( playerVehicle, r,g,b) end addEventHandler("onPlayerLogin",getRootElement(),setCarColours)
  8. https://wiki.multitheftauto.com/wiki/Get ... LightColor
  9. Of course you can. You're welcome.
  10. You can use the account data functions, that would be easier for you. getAccountData setAccountData
  11. I tried using the coords given, instead of what the script gives and it doesn't work either, is not on the right place.
  12. Remove the player from the vehicle, then set position?
  13. You could move him to another dimension.
  14. x = 1440.0651855469; y = -1725.3817138672; x2 = 1524.0031738281; y2 = -1600.7269287109; width = math.abs( x2 - x ); -- width = 1524 - 1440 = 84 height = math.abs( y2 - y ); -- height = -1600 - (-1725) = -1600 + 1725 = 125 createRadarArea( x, y, width, height ); I replaced these coordinates with ones from the Pyramid at Las Venturas and now it doesn't even appear. My coords: x = 2255.3669433594; y = 1344.3487548828; x2 = 2255.3669433594; y2 = 1219.9694824219; width = math.abs( x2 - x ); height = math.abs( y2 - y ); createRadarArea( x, y, width, height );
  15. http://i.imgur.com/berRt.jpg The created manually by your code works, but I can also create on that place without problems.
  16. We don't accept requests here, go learn to do it.
  17. I'm creating it like you say, but still bugged. Current code: if ( x2 > x ) then local tempx = x2 x2 = x x = tempx end if ( y2 > y ) then local tempy = y2 y2 = y y = tempy end width = math.abs( x2 - x ) height = math.abs( y2 - y ) local x = ( x - width ) Screenshot: http://i.imgur.com/Fc2Ec.jpg
  18. I copied it exactly like the script output, this makes it the same: local x = ( x - width ) Area 1: x = 1524.0031738281 x2 = 1440.0651855469 y = -1725.3817138672 y2 = -1600.7269287109 Area 2: x = 2389.6433105469 x2 = 2256.5837402344 y = 1347.0687255859 y2 = 1219.8205566406
  19. Area 1: x = 2257.3439941406 x2 = 2257.3439941406 y = 1347.7255859375 y2 = 1219.62890625 Area 2: x = 1434.8157958984 x2 = 1434.8157958984 y = -1724.2453613281 y2 = -1601.0743408203 The second area is bugged.
  20. , coronaMarker Eso esta de mas.
  21. I don't understand what do you mean.
  22. With this the result is the following: http://i.imgur.com/rmH12.jpg Edit: With this: if math.abs(x2) > math.abs(x) then local tempx = x2 x2 = x x = tempx end if math.abs(y2) > math.abs(y) then local tempy = y2 y2 = y y = tempy end local width, height = math.abs ( x2 - x ), math.abs ( y2 - y ) x = x - width In Los Santos it works fine, but then in other places like Las Venturas it bugs like this: http://i.imgur.com/Gfc0x.jpg
  23. Same problem. Edit: Check the screenshot again, I had uploaded wrong one.
  24. Hi everyone. I'm having issues with calculations for a radar area, for some reason is not creating it where it should: My code: local width, height = math.abs ( x2 - x ), math.abs ( y2 - y ) if ( x2 < x ) then local tempx = x2 x2 = x x = tempx end if ( y2 < y ) then local tempy = y2 y2 = y y = tempy end And the screenshot of the problem: http://i.imgur.com/pNEwh.jpg The RED rectangle is the radar area created by script, and the GREEN is where the radar area should be. I hope someone can help me with this issue. Thanks in advance.
  25. Castillo

    Problem

    setBlurLevel
×
×
  • Create New...