-
Posts
208 -
Joined
-
Last visited
Everything posted by Newbie
-
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 ?
-
Thanks! This worked perfectly: setModelHandling(415, "tractionMultiplier", 1.0)
-
Any opinions ? im trying to make car stable on corners.
-
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.
-
afaik yes, the race resource is editing the water level every round you play. But has nothing to do with admin rights. Yep.
-
Yes its server sided, by command.
-
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
-
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 ?
-
lol. Thanks Sam, and all other who helped
-
Still same sh.. at argument 1, got object
-
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
-
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
-
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..
-
which handling setting has biggest effect to car drifting ?
-
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
-
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)
-
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