Jump to content

Gr0x

Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by Gr0x

  1. function createTheGate () myGate1 = createObject ( 988, 313.599, -61.799, 1.6499, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( player ) if string.find( getPlayerName( player ) , "[out]", 1, true ) then moveObject ( myGate1, 2500, 308.5, -61.799, 1.6499 ) setTimer(movingMyGateBack,5000,1,player) end end addCommandHandler("open",openMyGate) function movingMyGateBack ( player ) if string.find( getPlayerName( player ) , "[out]", 1, true ) then moveObject ( myGate1, 2500, 313.599, -61.799, 1.6499 ) end end addCommandHandler("close",movingMyGateBack)
  2. You need to write colorcodes, and the player's nick, not the accountname.
  3. Gr0x

    A Question :)

    Maybe this? attachElements(object1,object,0,5,0) setTimer(detachElements,200,1,object1,object) setElementParent(object1,object) moveObject(object,...)
  4. Maybe you can use setElementVelocity setVehicleTurnVelocity
  5. Gr0x

    save [help]

    You defined accountData twice, but i don't know why isGuestAccount gives you error. Maybe you can try this, i use the same method to save things. function playerLogin (acc,account) if not account or isGuestAccount(account) then return false end local accountDataD = getAccountData (account, "Deaths") local accountDataK = getAccountData (account, "Kills") if accountDataK and accountDataD then setElementData(source,"Deaths",accountDataD ) setElementData(source,"Kills",accountDataK ) end end addEventHandler("onPlayerLogin", getRootElement(), playerLogin) function onQuit() local account = getPlayerAccount(source) if not account or (isGuestAccount(account)) then return false end setAccountData(account,"Deaths",getElementData(source,"Deaths")) setAccountData(account,"Kills",getElementData(source,"Kills")) end addEventHandler("onPlayerQuit", getRootElement(), onQuit) NOT TESTED! I hope i'm helped you, but i'm not sure it's work. Other thing: Same problem in your code, and you can't use strings. You need to define 'account' as an "account element", not string.
  6. use removeEventHandler()
  7. Gr0x

    Col Shape

    I rewrited my code (Not your) and i not make it for "Better rank". Ranks unnecessary.
  8. Gr0x

    Col Shape

    Try this: local radar = createRadarArea(-466.317, -468.559, -150, -90, 255, 255, 0, 175) local colRectangle = createColRectangle(-466.317, -468.559, -150.0, -90.0) function onEnter(hitElement) if (getElementType(hitElement) == "player" and source == colRectangle) then outputChatBox("You entered the zone, welcome.", hitElement, 0, 255, 0) end end addEventHandler("onColShapeHit", root, onEnter) function onExit(hitElement) if (getElementType(hitElement) == "player" and source == colRectangle) then outputChatBox("You left the zone, good bye.", hitElement, 0, 255, 0) end end addEventHandler("onColShapeLeave", root, onExit)
  9. Gr0x

    Col Shape

    Try this: local radar = createRadarArea(-466.317, -468.559, -150, -90, 255, 255, 0, 175) local colRectangle = createColRectangle(-466.317, -468.559, -150.0, -90.0) function onEnter(hitElement) if (getElementType(hitElement) == "player") then outputChatBox("You entered the zone, welcome.", hitElement, 0, 255, 0) end end addEventHandler("onColShapeHit", colRectangle, onEnter) function onExit(hitElement) if (getElementType(hitElement) == "player") then outputChatBox("You left the zone, good bye.", hitElement, 0, 255, 0) end end addEventHandler("onColShapeLeave", colRectangle, onExit)
  10. no problem.
  11. You don't need for, and getPedOccupiedVehicle,seat, jacked, etc... Use this, it's more simple: function zaa(theVehicle) if getPlayerTeam (source) then local r, g, b = getTeamColor ( getPlayerTeam ( source) ) if theVehicle then setVehicleColor ( theVehicle, r,g,b,r,g,b) end end end addEventHandler("onPlayerVehicleEnter",getRootElement(),zaa)
  12. function zaa(theVehicle) if getPlayerTeam (source) then local r, g, b = getTeamColor ( getPlayerTeam ( source) ) if theVehicle then setVehicleColor ( theVehicle, r,g,b,r,g,b) end end end addEventHandler("onPlayerVehicleEnter",getRootElement(),zaa)
  13. Gr0x

    Loggin in

    Color code example: outputChatBox(getPlayerName(source).." has logged in!", root,255,255,255,true)
  14. Gr0x

    LogIn - question

    acc = getPlayerAccount(player) if not isGuestAccount(acc) then --Your code, if not guest account (Player logged in) else --Your code, if guest account end
  15. 1, use onClientRender() 2, sX,sY = guiGetScreenSize() Absolute center: sX-sX/2, sY-sY/2 Relative center: 0.5,0.5 (if i know good)
  16. Gr0x

    Nitro NFS

    i think, you already have one.. name: race_nos But if no, use this: https://community.multitheftauto.com/index.php?p= ... ils&id=427
  17. Yes, a Hungarian topic will be useful. Please create it.
  18. So use: addCommandHandler( 'health', function( player, cmd, theHealth ) local theHealth = tonumber(theHealth) if (theHealth) then setElementHealth(player, theHealth) outputChatBox( 'Your health is now '..tostring( math.floor( getElementHealth( player ) ) )..'!',player,0,255,0 ) end end )
  19. in english, please?
  20. Hi. Me, and Lacoss (lackos888) made a script about 2 month ago. It's a radio script, I hope you will like it. Download link: https://community.multitheftauto.com/index.php?p= ... ls&id=3766
  21. Gr0x

    Problem

    It's not valid XML. It's the good:
  22. Open race config in adminpanel > resources tab, and add line "Owner" to the Admin Group, or something like this.
  23. Yes. use onClientMouseWheel Arguments: upOrDown up = 1 down = -1
  24. Good! But yes, use more deco
×
×
  • Create New...