Jump to content

IIYAMA

Moderators
  • Posts

    6,086
  • Joined

  • Last visited

  • Days Won

    215

Everything posted by IIYAMA

  1. 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)
  2. 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
  3. 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
  4. Maybe you should disable the coll. (so the camera won't get stuck)
  5. 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..
  6. 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)
  7. 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.)
  8. 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.
  9. if exports['EGvehicles']:isElementFrozen(vehicle) then It means that the script that receives this export does not accept these. The function isn't defined.
  10. As RoG}xXMADEXx said. Use txd workshop + photoshop(or something else) It will probably give more performance, while gaming.
  11. 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.
  12. 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.
  13. 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.
  14. aha well it may will work, but one trigger is something you can't compare with: elementdata*playerCount Thx anyway guys.
  15. 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.
  16. IIYAMA

    helppp!!!

    Also what will happen when a new player joins the server.
  17. 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)
  18. http://mta.dzek.eu/peds/ http://mta.dzek.eu/vehicle/
  19. 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)
  20. 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)
  21. 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
  22. yes it is a kind of bug. Maybe you can try something like this: (not tested) setElementCollidableWith ( vehicle, root,false )
  23. IIYAMA

    helppp!!!

    Even is the "setWeaponOwner" does not work very well(sync damage), you can get the player with "getWeaponOwner".
  24. yes, that is true, it is because when you reconnect your userdata got changed. To safe this per-ma, you have to use account data(mysql lite) or mysql. Account data is easier, my mysql gives more performance at bigger data bases, but is harder to script. https://wiki.multitheftauto.com/wiki/SetAccountData https://wiki.multitheftauto.com/wiki/GetAccountData
×
×
  • Create New...