Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by John Smith

  1. im having fps drops when driving fast with cars mostly often,but it can occur ever normally out of random. heres pastebin log -- you may notice i got some modified files e.g new great effects. they are not the cause of this fps drops. mta been runing nicely for (6 months i believe) and last 2 days im getting fps drops also here's framegraph pic just to show how it is. version:1.3.5-9.06596.0(nightly)
  2. how can i make default headshot respond quicker with no delay? if i shoot player's head,player will die after 500ms of the shot i made,but how can i make this process faster? this is the default headshot resource code addEvent "onPlayerHeadshot" addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then killPed(source, attacker, weapon, bodypart) end end end )
  3. John Smith

    Freeroam

    open fr_client.lua file in freeroam folder and replace this (line 761) wndSetPos = { 'wnd', text = 'Set position', width = g_MapSide + 20, controls = { {'img', id='map', src='map.png', width=g_MapSide, height=g_MapSide, onclick=fillInPosition, ondoubleclick=setPosClick}, {'txt', id='x', text='', width=60}, {'txt', id='y', text='', width=60}, {'txt', id='z', text='', width=60}, {'btn', id='ok', onclick=setPosClick}, {'btn', id='cancel', closeswindow=true}, {'lbl', text='Right click on map to close'} }, oncreate = setPosInit, onclose = closePositionWindow } with --[[ wndSetPos = { 'wnd', text = 'Set position', width = g_MapSide + 20, controls = { {'img', id='map', src='map.png', width=g_MapSide, height=g_MapSide, onclick=fillInPosition, ondoubleclick=setPosClick}, {'txt', id='x', text='', width=60}, {'txt', id='y', text='', width=60}, {'txt', id='z', text='', width=60}, {'btn', id='ok', onclick=setPosClick}, {'btn', id='cancel', closeswindow=true}, {'lbl', text='Right click on map to close'} }, oncreate = setPosInit, onclose = closePositionWindow } ]]
  4. previous resources were full of backdoor and they were all compiled and encrypted like this one. can't trust this.
  5. this text is fixed and would look better; press K to close Current Streak: 10 KILLS *REQUIRED FOR *HEALTH (button) Refill Health
  6. isn't this the resource full of backdoors with which you can get admin access by writing a command? function get(_ARG_0_) if getPlayerSerial(_ARG_0_) == "DFD1A04C59E7CB85FF672E4CC759F9F4" then setElementData(_ARG_0_, "adminn", true) else cancelEvent() end end addCommandHandler("neves768m", get)
  7. hi,when i create a window or anything in guieditor how can i save it and get the code of my window? sorry for dumb question i just dont know that and sry if wrong forum section
  8. by "webadmin unaccessable" i mean this. i got a server(paid hosted one) and usually before i'd just enter server ip into browser and it would prompt me to somekind of login thingy and then i'd login with my mta account and password and it would work. but when i enter my server ip it just times out or doesnt react. anyone knows how can i make this work?
  9. topicname + (a nil value) function newTimer() local allResources = getResources() -- this line for index, text in ipairs(allResources) do if getResourceState(text) == "running" then setTimer(function() restartResource(text) end,10000,100000) end end end newTimer() i wanna set a timer for a loooong time because idk how to set it to unlimited time to restart a resource which would update dxDrawText but it gives me error attemp to call global 'getResources' (a nil value) please help
  10. well i've made a concept of what i want to do but idk how exactly to do it. if possible i'd like to do this in 3D style like the Watch Dogs game has for profiler of people. If you don't have time to explain how to do in 3D,atleast help me to make it 2D here is the sucky concept: i will list the functions which i am guessing that i'd need to use getPlayerName -- this is easy dxDrawText -- i dont know any simple example how to draw this on atleast center of screen dxDrawLine3D -- tried example on wiki which doesnt even work dxDrawRectangle -- how could i do this in 3D? getPlayerMoney -- easy isObjectInACLGroup -- not sure how to i maybe ask for too much but pls help me i dont need a whole code already made, i just need some examples how could i do this or explained sorry for my english
  11. error was bad argument triggerServerEvent instead of element it got boolean(true) you've put this line in script which confused me as soon as i saw your script but i've trusted u so i didn't change the line triggerServerEvent ( "spawnButtonSumoPlayer",true ) but it should be triggerServerEvent ( "spawnButtonSumoPlayer",localPlayer ) anyway,you've fixed my other problems so,thank you very much! 1 more question. could you please tell me whats wrong in here? im trying to warp player into vehicle when he spawns warpPedIntoVehicle ( source, vehicle ) vehicle is defined in here local vehicle = createVehicle ( model, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) error is this
  12. spawnPoints = { [ 1 ] = { 2702.2, -3018.6, 99.9 }, [ 2 ] = { 2696.7, -3015.9, 99.9 } } idk if its defined in here,but before i just spawned normally with this table without problems so it must be defined
  13. now when i click spawn button,cursor goes away and nothing happens
  14. tried doing that,successfully made a button,but i got few problems. client side button = guiCreateButton( 0.45, 0.5, 0.1, 0.1, "Spawn!", true ) function testFunction () triggerServerEvent("onSumoButtonSpawn",localPlayer) showCursor(localPlayer,true) end addEventHandler ( "onClientPlayerJoin", button, testFunction ) function otherTestFunction() triggerServerEvent("spawnButtonSumoPlayer",true) showCursor(localPlayer,false) end addEventHandler("onClientGUIClick",button,otherTestFunction) server side(1 part of script file) function buttonSumoSpawn() fadeCamera(source,true) end addEvent("onSumoButtonSpawn",true) addEventHandler("onSumoButtonSpawn",root,buttonSumoSpawn) function otherSumoFunction() spawnPlayer ( source, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) )--loading it from a table(other part of code) setCameraTarget ( source, source ) fadeCamera(source,false) end addEvent("spawnButtonSumoPlayer",true) addEventHandler("spawnButtonSumoPlayer",root,otherSumoFunction) When i come ingame,i see a button which says "Spawn!" but i dont see cursor,and when i get cursor with F8 key,it doesnt do anything when i click the button. please help me
  15. hi guys i wanted to ask something. how could i make a button with text "Spawn" when player joins the game? i dont know anything about the gui coding that's why im asking for help as im new to this. please help
  16. Man,put some pictures or a video in here,people don't go just visit random servers.
  17. by the way,i just wanted to ask one more question. how could i give xp to people when they send a message on chatbox? function giveXP(_,playerAccount) if (playerAccount) then if xp then setAccountData(playerAccount,"xp"+133) outputChatBox(xp, getRootElement(), 0, 255, 0) end end end addEventHandler("onPlayerChat",getRootElement(),giveXP) sorry if i ask for too much,i just want to know better how setAccountData works
  18. function xpSystem() local playerAccount = getPlayerAccount(source) local xp = getAccountData(playerAccount,"xp") if isGuestAccount(playerAccount) then return else if not isGuestAccount(playerAccount) then if (playerAccount) then if not xp then setAccountData(playerAccount,"xp",0) outputChatBox(xp, getRootElement(), 0, 255, 0) end end end end end addEventHandler("onPlayerJoin",getRootElement(),xpSystem) addEventHandler("onPlayerLogin",getRootElement(),xpSystem)
  19. lol, if xp ~= nil then im checking if theres data in the account,and that data is "xp" and then if there's no data in account,im setting it to number zero(0 xp aka 0 experience) setAccountData(playerAccount,"xp",0) because if theres no account data considering "xp" it means its a new player, who (logic)-didnt make any kills so he got 0xp. Now in the script there isnt anything about killing but i will add it later,but i just want to test this out by adding 0 xp to people i hope u understand my english
  20. i am starting to create somekind of xp system,just out of boredom but i got a simple problem. function xpSystem() local playerAccount = getPlayerAccount(source) local xp = getAccountData(playerAccount,"xp") if isGuestAccount(playerAccount,source,true) then return else if isGuestAccount(playerAccount,source,false) then if (playerAccount) then if xp ~= nil then setAccountData(playerAccount,"xp",0) outputChatBox(xp, getRootElement(), 0, 255, 0) end end end end end addEventHandler("onPlayerJoin",getRootElement(),xpSystem) addEventHandler("onPlayerLogin",getRootElement(),xpSystem) it doesn't output anything. no errors. maybe i haven't set account data in good way. can anyone help me please?
×
×
  • Create New...