Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. I did test it, and yes. It disappears. I also checked if it had something to do with the ped. (with runcode) But no it isn't because of the ped, it is probably because after you scaled the object it got bugged. It have something to do with the distance from your camera to the object. But also the direction of the camera. and no you can't fix it, it is a gta san bug or maybe mta object scale bug. I will recommend you to remove your script from the forum. (else little kids will go play with it) Sorry that it can't be fixed. (I deleted the script from my pc)
  2. You have this problem with all objects? ( not much wrong with the code, only not really build on performance ) Some other things I did noticed about your code. -- you said server side. addEventHandler("onClientResourceStart", getRootElement(),--onResourceStart function () setInteriorSoundsEnabled(false) end ); -- you only have to index this one time: (local value is faster than re-index global tables for every single thing.) local myObject = object[source] -- try to use "elseif" if a > 1 then -- if elseif a < 1 then -- if not "if a > 1 then", then check again. end
  3. You can set all objects to low lod, (as far I know) You only have to fill in the correct syntax: not low lod, but does have col: createObject ( id, x, y, z, 0, 0, 0, false) Is low lod, but does not have a col: createObject ( id, x, y, z, 0, 0, 0, true)
  4. You also tried it without put it at your head? and what happens when you change it to a low lod object? createObject ( id, x, y, z, 0, 0, 0, true) -- low lod
  5. ye I mean col. ( I call it coll.) https://wiki.multitheftauto.com/wiki/Se ... onsEnabled -- server/client https://wiki.multitheftauto.com/wiki/Se ... idableWith -- client
  6. Maybe you should disable the coll. (so the camera won't get stuck)
  7. It is just 1 timer at server side. I use(normally) tickcount but tickcount does not loop,,,.,.,.,. Loop on client render can also sometimes be laggy, now you use also GPU power to loop.(+1 event), of course it is the best solution at client side. @arezu ah yes, my bad. I wasn't really ..... and..
  8. Jep, + 3 --not very efficient... setTimer(function ()--packetLossCheck for player,i in pairs(getElementsByType("player")) do if getNetworkStats(player)["packetlossTotal"] > 33 then kickPlayer ( player , "High PacketLoss. ") end end end, 1000 , 0)
  9. If you can't be a little bit clearer I can't help you. Here a both you got a perfect caller. It your codes don't contain the correct information I will be very hard to help you. (script names etc.)
  10. The function isn't defined. if exports['EGvehicles']: checkFrozen(player) then meta.xml <export function="checkFrozen" type="server"/> function checkFrozen(player) local vehicle = getPedOccupiedVehicle(player) if vehicle and getVehicleController(vehicle) == player then if isElementFrozen(vehicle) then setElementData(vehicle, "vehicle.handbrake", 0) setElementFrozen(vehicle, false) else setElementData(vehicle, "vehicle.handbrake", 1) setElementFrozen(vehicle, true) end end end Also calling onClientRender isn't a very good idea.
  11. if exports['EGvehicles']:isElementFrozen(vehicle) then It means that the script that receives this export does not accept these. The function isn't defined.
  12. As RoG}xXMADEXx said. Use txd workshop + photoshop(or something else) It will probably give more performance, while gaming.
  13. or if you aren't able to compile it your self, you can also try: http://mta.dzek.eu/compiler/ It is probably better compiled when you use your own compiler.
  14. I don't think you understand what I mean. I am talking about something very simple. But now I know it is impossible, without using timers.
  15. ah yes, but then I am sending this trigger. It doesn't really matter if it have been send, it was more meant to save data travel by preventing the trigger. Well it is just a trigger... but it is handy to know if there is a possibility to find a way to do this on client side, without using any extra bandwidth.
  16. aha well it may will work, but one trigger is something you can't compare with: elementdata*playerCount Thx anyway guys.
  17. Well as sample: There 3 players in-game and 1 player is going to join. When I start the resource, the 3 players are triggering to serverside. Next the other player joins the server and he triggered too. <-- and this is what I want to be prevent from happening. I tried to use getTickCount(), to get: This function returns amount of time that your system has been running in milliseconds. By comparing two values of getTickCount, you can determine how much time has passed (in milliseconds) between two events. This could be used to determine how efficient your code is, or to time how long a player takes to complete a task. But some how the tickcount is already changing after I started mta or when I reconnect to the server. (so I can't check if this player is new or already in game) ElementData isn't a solution, this script probably triggerd faster then the elementData reached the player who is downloading, next to that is is laggy, because all new client players have to download each other status. NL: Ik wil gewoon weten of de speler nieuw is of al in game is, so dat ik kan bepalen of ik het wil sturen of niet.
  18. IIYAMA

    helppp!!!

    Also what will happen when a new player joins the server.
  19. Well then you have to create it manually. engineImportTXD (engineLoadTXD ( "file" ), ID ) engineReplaceModel ( engineLoadDFF ( "file", ID ), ID ) Weapon ID's https://wiki.multitheftauto.com/wiki/Weapon Replace sounds isn't possible. (you have to play them with playSound or playSound3D)
  20. http://mta.dzek.eu/peds/ http://mta.dzek.eu/vehicle/
  21. If I start my script it will trigger to server side, to check if the player is login. What is the best way to check if the player did not just joined. This one must only be triggered(to server side) when the player is already in game. (client) addEventHandler( "onClientResourceStart", resourceRoot, function () triggerServerEvent("clientLoaded",localPlayer) end)
  22. He uses client side. You will see your self invisible(with the script under this), but other players won't see it. Use the script of Mr.Pres[T]ege at serverside. -- client, but not synced for all players. addCommandHandler ( "god", function (command )--toggleInvis if getElementAlpha(localPlayer ) == 0 then setElementAlpha ( localPlayer, 130) --not 255? else setElementAlpha ( localPlayer, 0 ) end end) Use this also serverside. function togglestaffMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("#ff0000God Mode Off",thePlayer,255,255,255,true) else setElementData(thePlayer,"invincible",true) outputChatBox("#00ff00God Mode On.",thePlayer,255,255,255,true) end end end addCommandHandler("god",togglestaffMode)
  23. Why don't you go reading what triggerServerEvent is? and maybe also take a close look at the wiki sample. To send information back. triggerClientEvent
  24. yes it is a kind of bug. Maybe you can try something like this: (not tested) setElementCollidableWith ( vehicle, root,false )
×
×
  • Create New...