Jump to content

Newbie

Members
  • Posts

    208
  • Joined

  • Last visited

Everything posted by Newbie

  1. Hello, i need some help guys. function renderDisplay ( ) local seconds = getTickCount() / 10000 dxDrawImage ( 0,0, 1000, 500, 'data/img/infernusai.png', angle, 0, 0 ) end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), renderDisplay) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) addCommandHandler ( "bibis", renderDisplay ) it keeps image all the time, i need to show it only for 10 seconds.. Can someone help me ?
  2. Newbie

    Fps

    There is any way to make FPS setting for player, lets say /fps 50 and it sets FPS for player max 50, not for all server players
  3. Newbie

    Car handling

    Thanks! This worked perfectly: setModelHandling(415, "tractionMultiplier", 1.0)
  4. Newbie

    Car handling

    Any opinions ? im trying to make car stable on corners.
  5. Newbie

    Water level

    Forget it guys, i've discovered that these functions dont work outside GTA SA Map, where mostly DD maps are made, i think its possible only while using createWater.
  6. Newbie

    Water level

    Any solution guys ?
  7. Newbie

    Water level

    afaik yes, the race resource is editing the water level every round you play. But has nothing to do with admin rights. Yep.
  8. Newbie

    Water level

    Yes its server sided, by command.
  9. Newbie

    Water level

    Hm... I tryed it in my script.. No errors came function buyWater (source) thePlayer = source cash = getPlayerMoney(source) local nick = getPlayerName(source) local x,y,z = getElementPosition(source) local level = getElementData(source,"Level") if level > 19.99 and cash > 5000 then setWaterLevel(30) outputChatBox("#FFFFFF" .. nick .. " #FF0000buys sea storm, watchout!", getRootElement(), 255, 255, 255, true) givePlayerMoney ( thePlayer, -5000 ) else outputChatBox("You need more cash or your level does not meet the requirements", source, 255, 255, 255, true) end end addCommandHandler("buyseastorm", buyWater) Even tryed this: to see does this even work addCommandHandler( "waterlevel", function ( plr, cmd, newlevel ) setWaterLevel( tonumber( newlevel ) ); end ); And nothing, maybe its cause im on race gamemode ? I've added admin rights to resource too
  10. Newbie

    Water level

    Ey, how to make sea level growing every 5 seconds ? Should i make a timers like 5 sec level 1 10 sec level 2 15 sec level 3 ?
  11. lol. Thanks Sam, and all other who helped
  12. Still same sh.. at argument 1, got object
  13. Since i never worked with timers, it looks hard to unerstand to me.. function buyHay (source) thePlayer = source cash = getPlayerMoney(source) local nick = getPlayerName(source) local x,y,z = getElementPosition(source) local level = getElementData(source,"Level") local hay = createObject(3374, x, y, z) if level > 1 and cash > 10 then setTimer(hay,2000) givePlayerMoney ( thePlayer, -10 ) else outputChatBox("You need more cash or your level does not meet the requirements", source, 255, 255, 255, true) end end addCommandHandler("buyhay", buyHay) it should create hay stack after 2 secs but does it instant
  14. Newbie

    doesnt work

    function levelSys (source) thePlayer = source local nick = getPlayerName(source) local playerwins = getElementData(source,"Wins") local lev = getElementData(source,"Level") local dds = getElementData(source,"Deaths") + getElementData(source,"Wins") outputChatBox("#FFFFFF" .. nick .. ":#FFFFFF Level: " ..lev.. "" , getRootElement(), 255, 255, 255, true) if getElementData(source,"Deaths") + getElementData(source,"Wins") < 1 then setElementData(source,"Level",1) if getElementData(source,"Deaths") + getElementData(source,"Wins") < 2 then setElementData(source,"Level",2) if getElementData(source,"Deaths") + getElementData(source,"Wins") < 4 then setElementData(source,"Level",3) if getElementData(source,"Deaths") + getElementData(source,"Wins") < 8 then setElementData(source,"Level",4) if getElementData(source,"Deaths") + getElementData(source,"Wins") < 15 then setElementData(source,"Level",6) end end end end end end addCommandHandler("ane", levelSys) Why it always show me level "0" The deaths + wins are 5 it should show as a level 3
  15. Newbie

    Level system

    function levelSys (source) thePlayer = source local nick = getPlayerName(source) local playerwins = getElementData(source,"Wins") local lev = getElementData(source,"Level") local dds = getElementData(source,"Deaths") + getElementData(source,"Wins") outputChatBox("#FFFFFF" .. nick .. ":#FFFFFF Level: " ..lev.. "" , getRootElement(), 255, 255, 255, true) end addCommandHandler("ane", levelSys) im making level system, its all about dds is it possible to make that for first level i need at least 1 Dm's And for all other levels *2. 2dms, 4dms, 8dms, 12dms, 24dms, ect..
  16. Newbie

    Car handling

    which handling setting has biggest effect to car drifting ?
  17. Newbie

    Cant win

    Fixed, thanks for "Help"
  18. function server.login( thePlayer, Username, Password ) --// Login the Player if ( thePlayer ~= "" and Username ~= "" and Password ~= "" ) then if ( getElementData( thePlayer, "Connection" ) ~= 1 ) then local accounts = dbQuery( server.connection, "SELECT * FROM hhc_accounts WHERE Accountname = '" .. Username .. "'" ) local result, rows, errormessage = dbPoll( accounts, -1 ) if ( rows == 1 ) then for i, row in pairs( result ) do local pass = string.upper( row['Password'] ) local salt = row['Salt'] local gens = md5( md5( salt .. pass .. salt ) ) local ePass = md5( Password ) local salted = md5( md5( salt .. ePass .. salt ) ) if ( gens == salted ) then --bla bla bla I've set data in dabatase correctly with Accountname "aaa" and Password "aaa" The password is coded by md5, can someone help me to remove coding and just read the password normally
  19. Newbie

    setElementData

    it is function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local playercar = getElementData(source,"car") setAccountData ( playeraccount, "car", playercar ) end end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local playercar = getAccountData ( playeraccount, "car" ) setElementData(source,"car",playercar or 0) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin)
  20. function Car1() if ( playeraccount ) then local playercar = getAccountData ( playeraccount, "car" ) setElementData(source,"car",405) end end addCommandHandler("car1", Car1) -- TO SPAWN CAR function callCar(player) if ( playeraccount ) then local playercar = getAccountData ( playeraccount, "car" ) local x,y,z = getElementPosition(player) createVehicle (playercar, x, y, z+3) end end addCommandHandler("callmycar", callCar) Im trying to set data as a car id, and then spawn car with that id in player location, but that dont work, nil at createvehicle
  21. Newbie

    Qestion

    I think that you guys didnt understood my question I will try to explain more "simplier" Let's say i play in freeroam, at my server, and i want to join to race, how could i do that ?
  22. Newbie

    Qestion

    Hey Guys, i want to ask, i am making a racing server with custom resources, and i need to know, is it possible to force player into "race" gamemode, when he loggins (reg/login panel runs at freeroam)
×
×
  • Create New...