Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. As far I know we talked about something that will be important after the remote control. No need to start a new topic when the subject skipped some steps. Just start with the remote control. AFAIK I was the one that was helping you in the first place, when he started talking about saving things permanently. So when you enter a vehicle, you can leave the vehicle and you still want to control it right?
  2. Is incorrect. addCommandHandler doesn't return a player at client side. That should be the localPlayer. (localPlayer doesn't have to be defined with the parameters, it is at every place at clientside reach able) triggerServerEvent("extermination", localPlayer) triggerServerEvent("extermination", localPlayer) is source At serverside the player is: source -- this is the element of the event handler.(when this is the player) or client (source doesn't have to be defined with the parameters, nor as client) @xDrul You can't just skip an argument of outputChatBox ...... ( it is serverside, not client side)
  3. IIYAMA

    What is wrong?

    it can be defined with a local, but only at the table it self. local sniper = {}
  4. IIYAMA

    What is wrong?

    local sniper = {} addEventHandler("onResourceStart", resourceRoot, function() local sniper[1] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[2] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[3] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[4] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) for _,data in ipairs(sniper) do setElementHealth( data, 100 ) end end)
  5. addEventHandler("onPlayerSpawn",root, function () end)
  6. Yes you did, why you need to prove it? Is it a test or something? Any way very good, but don't recommend him to save everything in xml, that is just a very bad habbit.
  7. IIYAMA

    Dead Peds

    local x, y, z, lx, ly, lz = getCameraMatrix (player) setCameraMatrix ( player, x, y, z, lx, ly, lz ) setElementPosition(player,0,0,1000)
  8. It is a mta bug. Can be solved with setting the ammo again.
  9. IIYAMA

    Dead Peds

    AFAIK, the player element exist when you join, but is somehow hidden. You can try: 0,0,-1000 or try a differed dimension.
  10. IIYAMA

    Dead Peds

    Ah you are talking about the player element. The player element can't be destroy, See wiki: The best way is using: setElementPosition() to a position which can't be reached.
  11. Yes some things and learn from those changes. and if it isn't working as you want, you should explain better.
  12. We all are giving the same answers except with more/other details. It is only a bit sadly, that I get performance lessons for tables, but ok I haven't seen that big-o page which is interesting.
  13. @ myonlake Of course it may takes longer when there are more items in it. I have tested the differences a year ago and still it elementdata takes 1000 t/m 10000 times longer. Also I didn't said that elementdata was wrong, I only said: "When you use it for all things", it will lagg the connection. If you are familiar with the server mini-mission server, it's syncs are partly destroyed by it. So it isn't true it can't lagg.
  14. IIYAMA

    Another Q

    A LOT, addEventHandler("onPlayerWasted", root, function () local player = source local account = getPlayerAccount (player) if not isGuestAccount ( account) then local rankss = (getAccountData(account, "Race Loses") or 0)+1 if rankss >= 0 then if (rankss <= 4) then if getElementData(player,"Rank") ~= "R1" then setElementData(player,"Rank","R1") end elseif (rankss <= 10) then if getElementData(player,"Rank") ~= "R2" then setElementData(player,"Rank","R2") end elseif (rankss <= 249) then if getElementData(player,"Rank") ~= "R3" then setElementData(player,"Rank","R3") end elseif (rankss <= 499) then if getElementData(player,"Rank") ~= "R4" then setElementData(player,"Rank","R4") end end end setAccountData(account,"Race Loses",rankss) end end)
  15. I only read that the resource has been taken by some player when he gets on the top of a vehicle? Are you talking about a car window or about a gui window? Is this google translator?
  16. AFAIK it has been designed to share efficient data/score between clients. When you use it for all things it will lagg the server and I know you are going to use it for everything, it is simply a starter habbit. I will recommend you to stay with those tables, because they are the most powerful/fasted/optimised scripting way. Simply because they are part of lua, when other things are just extended functions from mta. Next to saving in tables, your code can be shorter(writing less code) for the same result.
  17. IIYAMA

    Another Q

    Why not up date the rank at the moment you are losing/winning? Okay! Can you show an example ? Write the same code as at your first post, only at the place were the score get set. No example needed...
  18. Create/destroy, objects on clientside. And you have simply no limit, except you want 200,000 objects in a range of 300 units. As CrystalMV said: http://wiki.sa-mp.com/wiki/Limits Objects: 1000 MTA: It is 65535 elements which are also represents vehicles/players/peds/ markers etc.
  19. IIYAMA

    Another Q

    Why not up date the rank at the moment you are losing/winning?
  20. Scripten voor roleplay servers is niet leuk meer wegens het aantal gamemode leaks. Sorry.
  21. @manve1 or why don't call the lua variables(tables) instead... instead of those memory eaters. Loading every time a xml list of 1000+ players.... Sql and mysql for permanent saving. Tables for temporary. The rest have differed functionary's. XML: Saving settings for scripts serverside, saving cookies clientside. Elementdata: Usefull for sharing score with other players and server.
  22. You really think mta let you do that?
  23. and how do you want to do it then? -_-" You can't expect it to change doors from a vehicle that is inside your head.
  24. aha, nice to know
  25. local updateRatio = function (Scrolled) local position = guiScrollBarGetScrollPosition(Scrolled) local door = getElementData(Scrolled, "Type") local vehicle = getPedOccupiedVehicle ( localPlayer )-- get it's vehicle if vehicle and door and position then -- check if all the data is there. triggerServerEvent ("openDoorOrClose",vehicle,door, position) -- start sending. end end addEventHandler("onClientGUIScroll", root, updateRatio)
×
×
  • Create New...