Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. I heard good things about this host, really great that you support AlertPay. However, it would be better to make less slots packages, some people just want a small server. Also, a donations feature would be great.
  2. JR10

    Chating

    The message normally is white, unless there is a script to change it.
  3. Micro, you just bumped an old topic, check the last post date next time.
  4. JR10

    accounts.xml

    It doesn't anymore, now accounts are stored in internal.db.
  5. It was encoded in ANSI, I changed it to UTF-8, didn't work in both cases.
  6. JR10

    Scale player

    There is no function for it, I think shaders might do the job.
  7. JR10

    chatbox

    https://wiki.multitheftauto.com/wiki/OnClientChatMessage https://wiki.multitheftauto.com/wiki/OnPlayerChat https://wiki.multitheftauto.com/wiki/OnChatMessage
  8. JR10

    Nametag

    Show your code now.
  9. JR10

    Nametag

    math.floor(256-256*(health)) What is that? 0*health, so it will always return zero.
  10. JR10

    Nametag

    Where is screenWidth and screenHeight defined? You need to add dxDrawRectangle to onClientRender event. The argument in getElementAlpha is wrong, supposed to be an element.
  11. Just change the version in meta.xml, and upload it.
  12. local bankWeaponMarker=createMarker(2304.19921875, -16.19921875, 25.5, "cylinder", 1, 0, 0, 255, 255) function installEverything(hElement) triggerClientEvent ( hElement,"hitTheMarker" ,hElement) end addEventHandler("onMarkerHit", bankWeaponMarker, installEverything)
  13. model = {} x = {} y = {} z = {} rx = {} ry = {} rz = {} numberplate = {} paintjob = {} temp = {} vehicle = {} function loadup(startedRecource) vehicles = xmlLoadFile ( "vehicles.xml" ) count = xmlNodeGetChildren(vehicles) for i=1,#count do local vehicle = xmlFindChild ( vehicles, "vehicle", i-1 ) local attributes = xmlNodeGetAttributes ( vehicle ) for name,value in pairs ( attributes ) do temp["" .. name .. ""] = value end x[i] = temp["posX"] y[i] = temp["posY"] z[i] = temp["posZ"] rx[i] = temp["rotX"] ry[i] = temp["rotY"] rz[i] = temp["rotZ"] numberplate[i] = temp["plate"] paintjob[i] = temp["paintjob"] model[i] = temp["model"] vehicle = createVehicle ( model[i], x[i], y[i], z[i], rx[i], ry[i], rz[i], numberplate[i]) setVehicleHeadLightColor (vehicle, 0, 0, 255) setVehicleColor ( vehicle, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) end xmlUnloadFile ( vehicles ) end function checkowner (player,seat,jacked) local account = getPlayerAccount( player) if (seat == 0 and not isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Admin' ))) then outputChatBox ( "Car designed for admins", player, 200, 0, 0 ) cancelEvent() end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), loadup ) addEventHandler ( "onVehicleStartEnter", resourceRoot, checkowner) Not sure if this is what you mean.
  14. No one can enter because it's for admins only.
  15. JR10

    What's wrong ?

    g_dxGUI.cashnum:text(tonumber(getCashPlayer = getAccountData(getAcc, "Cash"))) This line is completely wrong, getAccountData is server side, getAcc is not defined, and getCashPlayer is wrong too. You should trigger event with the cash as an argument. getStats function is not defined, you commented setPlayerCash so it's not defined too.
  16. JR10

    Help plz D:

    local VEHICLE_POSITION = { -3992.5, 390.79998779297, 3.5999999046326} local MARKER_POSITION = { -3763.099609375, 475.19921875, 4.5} local marker1 function createTheMarker() local x, y, z = unpack(MARKER_POSITION) marker1 = createMarker( x, y, z, "corona", 1, 0, 255, 0, 255) end addEventHandler("onResourceStart",resourceRoot,createTheMarker) function IfMarkerHit(hitplayer) local x1, y1, z1 = unpack(VEHICLE_POSITION) local vehicle1 = createVehicle(481 , x1, y1, z1) end addEventHandler("onMarkerHit",marker1,IfMarkerHit)
  17. Mine does work, yours will too, but the variable bankWeaponMarker is local inside createMyMarker function, so it can only be used inside createMyMarker. function createMyMarker() bankWeaponMarker=createMarker(2304.19921875, -16.19921875, 25.5, "cylinder", 1, 0, 0, 255, 255) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), createMyMarker) function installEverything(hElement) triggerClientEvent ( hElement,"hitTheMarker" ,hElement) end addEventHandler("onMarkerHit", bankWeaponMarker, installEverything) I changed bankWeaponMarker variable to global, so it can be used everywhere in the script.
  18. Full script and vehicle.xml please.
  19. This is so messed up. Server: local bankWeaponMarker=createMarker(2304.19921875, -16.19921875, 25.5, "cylinder", 1, 0, 0, 255, 0) function installEverything(hElement) triggerClientEvent ( hElement,"hitTheMarker" ,hElement) end addEventHandler("onMarkerHit", bankWeaponMarker, installEverything) client: function gunWindow() buyGun_Window[1] = guiCreateWindow(374,104,346,519,"Select Your Weapon",false) guiWindowSetSizable(buyGun_Window[1],false) weaponList_Grid[1] = guiCreateGridList(11,31,324,435,false,buyGun_Window[1]) guiGridListSetSelectionMode(weaponList_Grid[1],2) weaponAccept_Button[1] = guiCreateButton(12,477,118,33,"Accept",false,buyGun_Window[1]) weaponCancel_Button[2] = guiCreateButton(213,477,118,31,"Cancel",false,buyGun_Window[1]) end addEvent("hitTheMarker", true) addEventHandler("hitTheMarker", root, gunWindow)
  20. This is weird, I already tried that some time ago, and it worked, but for some reason it doesn't know.
  21. Are you sure you typed in the whole name correct?
  22. function checkowner (player,seat,jacked) local account = getPlayerAccount( player) if (seat == 0 and not isObjectInACLGroup( 'user.'..getAccountName( account ), aclGetGroup( 'Admin' ))) then outputChatBox ( "You cannot drive this vehicle as it belongs to Admins ", player, 200, 0, 0 ) cancelEvent() end end 'player' in getAccountName instead of 'account'.
  23. What do you need to know about it, getPlayerFromPartialName?
×
×
  • Create New...