Jump to content

Alpha

Members
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Alpha

  1. Alpha

    Need help

    local myMarker = createMarker(2489.1613769531, -1668.5617675781, 11.800, 'cylinder', 2.2, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) if elementType == "player" then setPedOnFire ( hitElement, true ) end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) You're using root element in setPedOnFire, which will affect all the players.
  2. Alpha

    Need help

    What does it say?
  3. viewtopic.php?f=91&t=27739
  4. Alpha

    كود

    مش فاهم دايرة 23؟؟
  5. Alpha

    Need help

    Try outputting debug messages, anything in /debugscript 3?
  6. Introduction: A support system resource, allows players to submit tickets, I will add more features like Live Support, features list below. Current Version 1.0.2 Released 2012-03-27 | Next Version 1.1 Instructions: Use /support to open the GUI. Support admins must have permission to function.banPlayer. Features: Tickets, players can submit tickets, admins can review it, and reply. Admins can close tickets, which won't be visible by default. The resource uses SQLite to save. Screenshots: Download If you find any bugs, or have any suggestions, please reply here.
  7. https://wiki.multitheftauto.com اتعلم هذا الكود بيزود السيارة بنايترو
  8. Alpha

    XML RAM overuse

    XML is not recommended for saving, unless it's one file, you are probably using it for accounts or such. I recommend SQLite.
  9. Alpha

    كود

    <meta> <info author="50p" version="0.1.0" type="misc" /> <script src="server.lua" type="server" /> </meta> meta.xml كل دة و المشكلة فى
  10. Alpha

    كود

    local theMarker = createMarker(1820.3000488281,1248,7.5,"cylinder", 1.5, 255,255,0,170) addEventHandler("onMarkerHit", theMarker, function(hitElement) if (getElementType(hitElement) == "vehicle") then local kmh = getElementSpeed(hitElement,"kph") if (kmh > 180 ) then local driver = getVehicleOccupant(hitElement) givePlayerMoney(driver,1000) outputChatBox("You Won $1000",driver,255,255,0) end end end) function getElementSpeed(element, unit) if not element or not isElement(element) then return false end if unit == "kph" then unit = 1.61 else unit = 1 end local velX, velY, velZ = getElementVelocity(element) return(velX ^ 2 + velY ^ 2 + velZ ^ 2) ^ 0.5 * unit * 100 end
  11. Alpha

    كود

    Try: local theMarker = createMarker(1820.3000488281,1248,7.5,"cylinder", 1.5, 255,255,0,170) addEventHandler("onMarkerHit", theMarker, function(hitElement) if (getElementType(hitElement) == "vehicle") then local kmh = getElementSpeed(getPedOccupiedVehicle(hitElement),"kph") if (kmh > 180 ) then local driver = getVehicleOccupant(hitElement) givePlayerMoney(driver,1000) outputChatBox("You Won $1000",driver,255,255,0) end end end) function getElementSpeed(element, unit) if not element or not isElement(element) then return false end if unit == "kph" then unit = 1.61 else unit = 1 end local velX, velY, velZ = getElementVelocity(element) return(velX ^ 2 + velY ^ 2 + velZ ^ 2) ^ 0.5 * unit * 100 end
  12. Alpha

    Tag

    -- server function stafftag(text, msgtype) local account = getPlayerAccount ( source ) local name = getPlayerName(source) if (msgtype == 0) then if isGuestAccount (source) then cancelEvent() outputChatBox("#000000[GUEST] #0066FF" .. name .. ":#0066FF " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, stafftag) No need to define root, it's already defined.
  13. Alpha

    Tag

    You need to cancel the event, else it will output two times. -- server!!! function stafftag(text, msgtype) local account = getAccountName(getPlayerAccount(source)) -- get account (admin) local name = getPlayerName(source) --your name if (msgtype == 0) then -- the type if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then -- check if admin outputChatBox("#000000[sTAFF] #0066FF" .. name .. ":#0066FF " .. text, root, 255, 255, 255, true) -- replace with [sTAFF] Name and text cancelEvent() end end end addEventHandler("onPlayerChat", root, stafftag)
  14. The accounts and accounts data are saved in internal.db, if you move that file with the server, you will get all the accounts and the accounts data.
×
×
  • Create New...