ReZurrecti0n

Members
  • Content Count

    77
  • Joined

  • Last visited

Community Reputation

4 Neutral

About ReZurrecti0n

  • Rank
    Transformer
  • Birthday 12/12/1979

Details

  • Location
    Florida, US
  • Occupation
    Game Designer
  • Interests
    Role Play Games

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. It could possibly have been how I was using all my triggerClientEvent functions, the very first "optional" argument was missing, therefore triggering the client events for everyone... However, its difficult to test since I need more than myself to confirm I've even fixed this issue...
  2. You should use the code tag to post your code in if(Example)then -- Codes end It's the <> icon...
  3. Well, remember to use local variables, nil global variables the moment it is no longer needed. Close any file you open after you're done with it. Just basic common sense really, anything at all you put into play should be put down after its use is up. Shortest possible time on server and client doesn't make much sense to me. And not familiar with the shader system, but makes sense if it may cause a frame drop depending on how complex it is. So... Only use it you feel it worth the performance it may cost...
  4. local highestping=0 local playername for loop,target in ipairs(getElementsByType("player"))do if(getPlayerPing(target)>highestping)then highestping=getPlayerPing(target) playername=getPlayerName(target) end end if(playername)then print("Player "..playername.." has the highest ping ("..highestping..")") Of course you will need to modify the values to your own code for (toptime), but it could be done with something like this... If I am understanding what you're saying correctly anyway
  5. I just discovered that client side events will trigger for everyone rather than just the one who triggers the event. So I need some way to check and run the code for only the one who triggered it. I'm currently having issues with one player pressing the F1 key (OnClientKey) to open a menu (custom PlayerMenu()) and everyone is getting that menu when it is only meant for the player who triggers it. How would I work this out to make it so only the triggering player gets the menu? Check using localPlayer? But what would I check against? How exactly does it all work?
  6. Same EXACT thing JUST happened to me as well... Will attempt a restart as recommended Update: I was able to get back in game by restarting both the server and client completely
  7. Marker = createMarker(1702.7998046875, -1079.2001953125, 22.89999961853, "cylinder", 2, 0, 0, 255) -- Global variable for a marker (Probably should be local) local myMarker = createMarker(1702.7998046875, -1079.2001953125, 22.89999961853, 'cylinder', 2.0, 0, 0, 255, 150) -- Locl variable for a marker function MarkerHit( Element, matchingDimension )-- The function, notice the arugments as it will be useful (Element is whatever hits the marker, a player) -- triggerClientEvent ( "onMarkerHit", getRootElement())-- This will call MarkerHit, but we already triggered MarkerHit, so this is an infinite loop outputChatBox("GG",Element)-- This is our goal... By adding the Element argument, sends the message ONLY to the player that hit the marker end -- Ends the function, easy enough addEventHandler( "onMarkerHit", getRootElement(), MarkerHit )-- Defines that MTA-SA's onMarkerHit will be the function MarkerHit, had to change this too... It will take some time, but you must learn in general how coding/scripting is done, try to understand what every line is doing. Use the MTA-SA Wiki for Events, Functions and such. Lua is the language MTA SA uses, will need to learn how the language operates too. Remember, baby steps
  8. You should always try to pin point the problem by adding output messages everywhere. Or prints, but anyway, try putting a output right after the createmarker so you know that was successfully made, then another message right before TriggerClientEvent… Wait, I don't even think you need the TriggerClientEvent line, that would keep looping forever... Try commenting out that line and see if it works
  9. I've already resolved the issue... However, I was unable to detect if a player was in a vehicle from the onwastedplayer event, so I don't think that code would work based on that. My trouble was that the player would teleport with the vehicle the player died in (Blowing up their own vehicle) when the vehicle was respawned. I solved it by simply stopping the vehicle from respawning until the player spawned... I appreciate your help though, I strive to learn more everyday
  10. Line 2, after "cylinder" you put 2.0 instead of just 2 as the size, that might be your issue
  11. I don't think you can destroy a player (I remember reading something that mentioned this a while back) The only way I know how to destroy a player is to disconnect them from the server altogether, but I could be wrong as I'm not yet that familiar with MTA-SA
  12. Seems like you are trying to check a variable that doesn't exist or has been removed... But yes, MrTasty is right, we could help you more with more details
  13. I had thought of that, but the custom name tag still appears at the new location which led me to believe it wasn't a camera issue, I appreciate the thought though I did resolve my issue with my previous post, now the vehicle doesn't respawn until the player does which I figured was the best fix for it
  14. This is what I ended up doing: Lucky for me, the player is still detected in the vehicle on this event... function VehicleExplode() if(getVehicleOccupants(source))then toggleVehicleRespawn(source,false) setTimer(function(source)toggleVehicleRespawn(source,true);end,300000,1,source) end end
  15. I'm testing by simply taking a Hydra and blowing itself up. Nothing has worked yet, can't remove the player from the vehicle, nor teleport the player either. I guess because the player is considered dead and not respawned yet. I'm thinking about targeting the vehicle instead, I can use a variable to remember what vehicle the player was in and if that vehicle respawns, cancel the event and respawn it when the player spawns... Will mess around a bit and try some work arounds, but still open to ideas if anyone has any and will report any results Is anyone familiar with resetVehicleExplosionTime and how it works, exactly? I mean if used to stop the respawn at that point, will it still respawn later?