Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Sorry but I don't PREFER THAT. onPlayerJoinSkin is not even a event. There's onElementModelChange. Bilal stop giving wrong information, you must make that event. I'm sorry if this offended you but indentation is the most important thing. I'm ready to teach you how to indent code's @ moez. Contact me at skype anubhav.agarwal80 whenever you're free! Now for that you must use this functions! I'm making a small part for you, you must find out the other. function getVehicleHP() if getElementHealth(source) / 100 > 25 then -- Ye check karta hein vehicle ki health ( vo return hoti hein 1000 if full health ) tho ham usko 100 sa divide karke check karte hein os ki hp low hein ki nahi. 20 ke around vehicle blast ho ja ti. -- ?? WHAT TO DO HERE? It's a mystery! end -- Hamlog if ko end karte hein end -- Hamlog function ko end karte hein! addEventHandler("onVehicleDamage"", root, getVehicleHP) -- Ye event add kar tha hein getVehicleHP ko. Ye tab hota jab KOI BHI VEHICLE KI HEALTH LOW HOTHI HEIN!
  2. fadeAlert = {} function addRednessOnDamage() for k, source in ipairs(getElementsByType("player")) do if getElementHealth(source) < 20 then fadeAlert[source] = true else if fadeAlert[source] then fadeAlert[source] = false end end end end setTimer(addRednessOnDamage, 2500, 0) function removeIt() fadeCamera( source, true ) end function checkRedness() for k, source in ipairs(getElementsByType("player")) do if fadeAlert[source] then fadeCamera( source, false, 1.0, 255, 0, 0 ) removeIt( source ) setTimer(checkRedness, 1000, 1) end end end
  3. fadeCamera and getElementHealth with if statement on server side with a timer of 1500
  4. setObjectBreakable is client side function,
  5. Make it client sided. function onWorldStart ( ) addObject ( ) end function addObject ( ) brrier = { } garage = { } tfcone = { } brrier [ 1 ] = createObject ( 1422, -1883.9, -802, 31.4, 0, 0, 270, false ) brrier [ 2 ] = createObject ( 1422, -1889, -812.6, 31.4, 0, 0, 0, false ) brrier [ 3 ] = createObject ( 1422, -1885.9, -812.6, 31.4, 0, 0, 0, false ) brrier [ 4 ] = createObject ( 1422, -1882.5, -812.2, 31.4, 0, 0, 16, false ) brrier [ 5 ] = createObject ( 1422, -1879.2, -811, 31.4, 0, 0, 28, false ) brrier [ 6 ] = createObject ( 1422, -1876.6, -808.9, 31.4, 0, 0, 49.9, false ) brrier [ 7 ] = createObject ( 1422, -1875.5, -805.8, 31.4, 0, 0, 90, false ) brrier [ 8 ] = createObject ( 1422, -1875.5, -802.8, 31.4, 0, 0, 90, false ) brrier [ 9 ] = createObject ( 1422, -1873.4, -800.6, 31.4, 0, 0, 0, false ) brrier [ 10 ] = createObject ( 1422, -1870.4, -800.6, 31.4, 0, 0, 0, false ) brrier [ 11 ] = createObject ( 1422, -1885.8, -800.6, 31.4, 0, 0, 0, false ) brrier [ 12 ] = createObject ( 1422, -1888.8, -800.6, 31.4, 0, 0, 0, false ) brrier [ 13 ] = createObject ( 1422, -1888.8, -803.5, 31.4, 0, 0, 0, false ) brrier [ 14 ] = createObject ( 1422, -1885.8, -803.5, 31.4, 0, 0, 0, false ) garage [ 1 ] = createObject ( 11504, -1872.6, -763.09998, 30.9, 0, 0, 270, false ) tfcone [ 1 ] = createObject ( 1238, -1875.5, -807.5, 31.3, 0, 0, 0, false ) tfcone [ 2 ] = createObject ( 1238, -1877.7, -810.09998, 31.3, 0, 0, 0, false ) tfcone [ 3 ] = createObject ( 1238, -1877.7, -810.09998, 31.3, 0, 0, 0, false ) tfcone [ 4 ] = createObject ( 1238, -1884.2, -812.59998, 31.3, 0, 0, 0, false ) tfcone [ 5 ] = createObject ( 1238, -1875.3, -800.70001, 31.3, 0, 0, 0, false ) breakableObject = { brrier = { }, tfcone = { } } for theKey, breakableObject in ipairs ( breakableObject ) do setElementFrozen ( breakableObject, true ) setObjectBreakable ( breakableObject, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, onWorldStart )
  6. Anubhav

    The last reply

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CrAPPy CrAPPy CrAPPy -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  7. Maybe it tells the debug information as luac.multitheftauto.com output's.
  8. He said downloadFile and not latent events. He can use triggerLatentClientEvent to do that. Think before posting.
  9. Connecting a string into a variable name? auto ban yourself from this forums for god sake, you don't even know what the hell are you doing Ontopic: You can save the values when the value changes, it will keep your data safe in case of server crash or anything else, also you can make a timer and save the data every five minutes, but take in mind that there is more data to be updated since in those five minutes the values changed and didn't get saved when it changed, so I'd rather save it when the value changes. You can make a table with the player account as index, for example: local _playerstats = {} local query = dbQuery(your_database_connection, "SELECT * FROM player_stats WHERE account = '" ..the_player_account_name.. "'") local result = dbPoll(query, -1) if #result > 0 then _playerstats[the_player_account_name] = {} _playerstats[the_player_account_name].kills = 1 _playerstats[the_player_account_name].deaths = 89 _playerstats[the_player_account_name].name = "HeyYou" end Also, I see that you are creating tables for each player stats, what you have to is make a table named stats and then insert new values in that table. I told I'm not sure.
  10. Anubhav

    [HELP] OOP

    (facepalm). There is Client OOP but not for this function. Use this local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" } addEventHandler( "onClientResourceStart", resourceRoot, function() if(not getElementData(localPlayer,"draw.hud")) then for _, component in ipairs( components ) do component:showHudComponent(false) end end end)
  11. Anubhav

    [HELP] OOP

    There is no OOP for client-side!
  12. getPlayerName(source)_data = dbPoll (queryHandle, 10) Not realy sure.
  13. 2nd one would be better. And I don't suggest to use -1 on dbPoll as it make's server freeze dbPoll returns the converted table. So something like this: playerData[row].column
  14. stopped working on it. no dev's no nothing. I'm busy with php hh
  15. Anubhav

    hud

    Yoya read the licence. You claimed it's your, I can sue you easily. Warning you.
  16. Anubhav

    Question

    MTA doesn't support CLEO.
  17. He didn't say when the server shutdowns. He just wants to save the data when a player leaves from the server, onClientResourceStop gets called when player disconnects/quits from MTA. You misunderstood me, I meant that server sided script will be un-loaded before client. So it will give out a error!
  18. It won't work. Server sided script will be un-loaded until the time!
×
×
  • Create New...